Minimalist PyTorch convolutional neural network implementation for object recognition.
conda create --name pytorch python=3
source activate pytorch
- pytorch (tested with version 0.4.0)
pip install -r requirements.txt
The overall procedure to train a network is divided into two parts:
- Create an opts file.
- Train with that opts file.
Use opts.py
to generate an opts file. By default, this will create an opts file for training a simple residual network on the CIFAR10 dataset (which will be automatically downloaded).
The script can parse arguments so you can generate multiple opts file as you want (see script for the list of available arguments):
python opts.py --option-type option-value
The opts file is saved as opts.txt
in folder designated by experiment_folder
, which will be created if it does not exist. By default, experiment_folder=results/exp1
.
Use main.py
with the previously generated opts file. For instance:
python main.py results/exp1/opts.txt
will start training a residual network in CIFAR10.