Skip to content

A minimalistic boiler plate code for training pytorch models

License

Notifications You must be signed in to change notification settings

nmakes/pytorch_boiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python 3 version Pytorch version

Code Size

LICENCE

Introduction

Pytorch Boiler is a minimalistic boiler plate code for training pytorch models.

Quick Start

  • Clone this repository

        git clone https://github.com/nmakes/pytorch_boiler
        cd pytorch_boiler
  • Run sample experiments

    40-line MNIST/CIFAR classification:

        PYTHONPATH=$PYTHONPATH:./ python3 -m example_projects.image_classifier.train

    50-line MNIST/CIFAR autoencoder:

        PYTHONPATH=$PYTHONPATH:./ python3 -m example_projects.image_autoencoder.train

Installation

Basic Requirements:

  • numpy
  • pytorch
  • torchvision

Other Requirements:

  • nvidia-apex [install] (for mixed-precision training)

Supported Functionalities

  • Customizable Train / Inference engine with forward and infer modes
  • Tracking multiple training / validation losses and metrics
  • Loading / Saving model, optimizer and trackers based on validation loss
  • Training MNIST / CIFAR in 40-lines (see train.py)
  • Supports Apex Amp for mixed precision training

TODO

  • Support for multiple loss optimization using multiple optimizers
  • Support for tensorboard plots
  • Support for torchscript
  • Documentation: using metrics and losses beyond the example script

Cite

If you found Pytorch Boiler useful in your project, please cite the following:

@software{Venkat_Pytorch_Boiler,
    author = {Venkat, Naveen},
    title = {{Pytorch Boiler}},
    url = {https://github.com/nmakes/pytorch_boiler},
    year = {2022}
}

Thanks!

About

A minimalistic boiler plate code for training pytorch models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages