All Projects → inferno-pytorch → Inferno

inferno-pytorch / Inferno

Licence: other
A utility library around PyTorch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Inferno

Kaolin
A PyTorch Library for Accelerating 3D Deep Learning Research
Stars: ✭ 2,794 (+1078.9%)
Mutual labels:  neural-networks
Dilated Cnn Ner
Dilated CNNs for NER in TensorFlow
Stars: ✭ 222 (-6.33%)
Mutual labels:  neural-networks
Neural Network From Scratch
Ever wondered how to code your Neural Network using NumPy, with no frameworks involved?
Stars: ✭ 230 (-2.95%)
Mutual labels:  neural-networks
18s096sciml
18.S096 - Applications of Scientific Machine Learning
Stars: ✭ 216 (-8.86%)
Mutual labels:  neural-networks
Pixel level land classification
Tutorial demonstrating how to create a semantic segmentation (pixel-level classification) model to predict land cover from aerial imagery. This model can be used to identify newly developed or flooded land. Uses ground-truth labels and processed NAIP imagery provided by the Chesapeake Conservancy.
Stars: ✭ 217 (-8.44%)
Mutual labels:  neural-networks
Adatune
Gradient based Hyperparameter Tuning library in PyTorch
Stars: ✭ 226 (-4.64%)
Mutual labels:  neural-networks
Mahjongai
Japanese Riichi Mahjong AI agent. (Feel free to extend this agent or develop your own agent)
Stars: ✭ 210 (-11.39%)
Mutual labels:  neural-networks
Stock Price Prediction Lstm
OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network
Stars: ✭ 232 (-2.11%)
Mutual labels:  neural-networks
Keras Gp
Keras + Gaussian Processes: Learning scalable deep and recurrent kernels.
Stars: ✭ 218 (-8.02%)
Mutual labels:  neural-networks
Color Accessibility Neural Network Deeplearnjs
🍃 Using a Neural Network to improve web accessibility in JavaScript.
Stars: ✭ 230 (-2.95%)
Mutual labels:  neural-networks
Rigl
End-to-end training of sparse deep neural networks with little-to-no performance loss.
Stars: ✭ 216 (-8.86%)
Mutual labels:  neural-networks
Tcdf
Temporal Causal Discovery Framework (PyTorch): discovering causal relationships between time series
Stars: ✭ 217 (-8.44%)
Mutual labels:  neural-networks
Gam
A PyTorch implementation of "Graph Classification Using Structural Attention" (KDD 2018).
Stars: ✭ 227 (-4.22%)
Mutual labels:  neural-networks
Tutorials
AI-related tutorials. Access any of them for free → https://towardsai.net/editorial
Stars: ✭ 204 (-13.92%)
Mutual labels:  neural-networks
Echotorch
A Python toolkit for Reservoir Computing and Echo State Network experimentation based on pyTorch. EchoTorch is the only Python module available to easily create Deep Reservoir Computing models.
Stars: ✭ 231 (-2.53%)
Mutual labels:  neural-networks
Bayesiandeeplearning Survey
Bayesian Deep Learning: A Survey
Stars: ✭ 214 (-9.7%)
Mutual labels:  neural-networks
Machine Learning Notebooks
Machine Learning notebooks for refreshing concepts.
Stars: ✭ 222 (-6.33%)
Mutual labels:  neural-networks
Deepposekit
a toolkit for pose estimation using deep learning
Stars: ✭ 233 (-1.69%)
Mutual labels:  neural-networks
Nn
🧑‍🏫 50! Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠
Stars: ✭ 5,720 (+2313.5%)
Mutual labels:  neural-networks
Mydatascienceportfolio
Applying Data Science and Machine Learning to Solve Real World Business Problems
Stars: ✭ 227 (-4.22%)
Mutual labels:  neural-networks

======= Inferno

.. image:: https://anaconda.org/conda-forge/inferno/badges/version.svg
:target: https://anaconda.org/conda-forge/inferno

.. image:: https://travis-ci.org/inferno-pytorch/inferno.svg?branch=master :target: https://travis-ci.org/inferno-pytorch/inferno

.. TODO new docs shield goes here, see https://github.com/inferno-pytorch/inferno/issues/139 .. image:: https://readthedocs.org/projects/inferno-pytorch/badge/?version=latest :target: http://inferno-pytorch.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: http://svgshare.com/i/2j7.svg

Inferno is a little library providing utilities and convenience functions/classes around PyTorch <https://github.com/pytorch/pytorch>_. It's a work-in-progress, but the releases from v0.4 on should be fairly stable!

Features

Current features include:

  • a basic Trainer class <https://github.com/nasimrahaman/inferno/tree/master/docs#preparing-the-trainer>_ to encapsulate the training boilerplate (iteration/epoch loops, validation and checkpoint creation),
  • a graph API <https://github.com/nasimrahaman/inferno/blob/master/inferno/extensions/containers/graph.py>_ for building models with complex architectures, powered by networkx <https://github.com/networkx/networkx>_.
  • easy data-parallelism <https://github.com/nasimrahaman/inferno/tree/master/docs#using-gpus>_ over multiple GPUs,
  • a submodule <https://github.com/nasimrahaman/inferno/blob/master/inferno/extensions/initializers>_ for torch.nn.Module-level parameter initialization,
  • a submodule <https://github.com/nasimrahaman/inferno/blob/master/inferno/io/transform>_ for data preprocessing / transforms,
  • support <https://github.com/nasimrahaman/inferno/tree/master/docs#using-tensorboard>_ for Tensorboard <https://www.tensorflow.org/get_started/summaries_and_tensorboard>_ (best with atleast tensorflow-cpu <https://github.com/tensorflow/tensorflow>_ installed)
  • a callback API <https://github.com/nasimrahaman/inferno/tree/master/docs#setting-up-callbacks>_ to enable flexible interaction with the trainer,
  • various utility layers <https://github.com/nasimrahaman/inferno/tree/master/inferno/extensions/layers>_ with more underway,
  • a submodule <https://github.com/nasimrahaman/inferno/blob/master/inferno/io/volumetric>_ for volumetric datasets, and more!

.. code:: python

import torch.nn as nn from inferno.io.box.cifar import get_cifar10_loaders from inferno.trainers.basic import Trainer from inferno.trainers.callbacks.logging.tensorboard import TensorboardLogger from inferno.extensions.layers.convolutional import ConvELU2D from inferno.extensions.layers.reshape import Flatten

Fill these in:

LOG_DIRECTORY = '...' SAVE_DIRECTORY = '...' DATASET_DIRECTORY = '...' DOWNLOAD_CIFAR = True USE_CUDA = True

Build torch model

model = nn.Sequential( ConvELU2D(in_channels=3, out_channels=256, kernel_size=3), nn.MaxPool2d(kernel_size=2, stride=2), ConvELU2D(in_channels=256, out_channels=256, kernel_size=3), nn.MaxPool2d(kernel_size=2, stride=2), ConvELU2D(in_channels=256, out_channels=256, kernel_size=3), nn.MaxPool2d(kernel_size=2, stride=2), Flatten(), nn.Linear(in_features=(256 * 4 * 4), out_features=10), nn.LogSoftmax(dim=1) )

Load loaders

train_loader, validate_loader = get_cifar10_loaders(DATASET_DIRECTORY, download=DOWNLOAD_CIFAR)

Build trainer

trainer = Trainer(model)
.build_criterion('NLLLoss')
.build_metric('CategoricalError')
.build_optimizer('Adam')
.validate_every((2, 'epochs'))
.save_every((5, 'epochs'))
.save_to_directory(SAVE_DIRECTORY)
.set_max_num_epochs(10)
.build_logger(TensorboardLogger(log_scalars_every=(1, 'iteration'), log_images_every='never'), log_directory=LOG_DIRECTORY)

Bind loaders

trainer
.bind_loader('train', train_loader)
.bind_loader('validate', validate_loader)

if USE_CUDA: trainer.cuda()

Go!

trainer.fit()

To visualize the training progress, navigate to LOG_DIRECTORY and fire up tensorboard with

.. code:: bash

$ tensorboard --logdir=${PWD} --port=6007

and navigate to localhost:6007 with your browser.

Installation

Conda packages for python >= 3.6 for all distributions are availaible on conda-forge:

.. code:: bash

$ conda install -c pytorch -c conda-forge inferno

Future Features:

Planned features include:

  • a class to encapsulate Hogwild! training over multiple GPUs,
  • minimal shape inference with a dry-run,
  • proper packaging and documentation,
  • cutting-edge fresh-off-the-press implementations of what the future has in store. :)

Credits

All contributors are listed here_. .. _here: https://inferno-pytorch.github.io/inferno/html/authors.html

This package was partially generated with Cookiecutter_ and the audreyr/cookiecutter-pypackage_ project template + lots of work by Thorsten.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].