Pytorch Boiler is a minimalistic boiler plate code for training pytorch models.
-
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
Basic Requirements:
numpy
pytorch
torchvision
Other Requirements:
nvidia-apex
[install] (for mixed-precision training)
- 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
- Support for multiple loss optimization using multiple optimizers
- Support for tensorboard plots
- Support for torchscript
- Documentation: using metrics and losses beyond the example script
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!