Skip to main content

A lightweight library to help with training neural networks in PyTorch.

Project description

Ignite

https://travis-ci.org/pytorch/ignite.svg?branch=master https://codecov.io/gh/pytorch/ignite/branch/master/graph/badge.svg

Ignite is a high-level library to help with training neural networks in PyTorch.

  • ignite helps you write compact but full-featured training loops in a few lines of code

  • you get a training loop with metrics, early-stopping, model checkpointing and other features without the boilerplate

Below we show a side-by-side comparison of using pure pytorch and using ignite to create a training loop to train and validate your model with occasional checkpointing:

assets/ignite_vs_bare_pytorch.png

As you can see, the code is more concise and readable with ignite. Furthermore, adding additional metrics, or things like early stopping is a breeze in ignite, but can start to rapidly increase the complexity of your code when “rolling your own” training loop.

Installation

From pip:

pip install pytorch-ignite

From conda:

conda install pytorch-ignite -c pytorch

From source:

python setup.py install

Documentation

API documentation and an overview of the library can be found here.

Examples

Please check out the examples to see how to use ignite to train various types of networks, as well as how to use visdom or tensorboardX for training visualizations.

Contributing

We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.

Please see the contribution guidelines for more information.

As always, PRs are welcome :)

How does this compare to Torchnet?

Ignite, in spirit is very similar to torchnet (and was inspired by torchnet).

The main differences with torchnet is the level of abstraction for the user. Ignite’s higher level of abstraction assumes less about the type of network (or networks) that you are training, and we require the user to define the closure to be run in the training and validation loop. In contrast to this, torchnet creates this closure internally based on the network and optimizer you pass to it. This higher level of abstraction allows for a great deal more of flexibility, such as co-training multiple models (i.e. GANs) and computing/tracking multiple losses and metrics in your training loop.

Ignite also allows for multiple handlers to be attached to events, and a finer granularity of events in the engine loop.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytorch-ignite-0.1.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytorch_ignite-0.1.0-py2.py3-none-any.whl (34.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytorch-ignite-0.1.0.tar.gz.

File metadata

File hashes

Hashes for pytorch-ignite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 afc63936aceffc1634c72d8f3cdea748df330fbdd2b3a1b75f393a9258914141
MD5 b009663d6db54bfc147944e8302b923f
BLAKE2b-256 691de3b8cffcc9dc6e9280cb224c68edfe36499e41339233fabcae9871e14cda

See more details on using hashes here.

File details

Details for the file pytorch_ignite-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytorch_ignite-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b54a6d731b9b3d7b5012d97c8aaec92ebd90c342d1be5d70d2637c85d1dcdffe
MD5 d858b167cd26aaeefc4a23a092fe959b
BLAKE2b-256 ec4eb8c45fe1fe03912b15630026983eca728896d10d32acc8428c8a1249cde8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page