Link to project report.
- Pytorch 1.4
- Numpy
- Pandas
Training
python train_perceptron.py --name perceptron --epochs 20
- Main Arguments
--name
: creates a directory inside the checkpoiints dir, where plots will be savedepochs
: No. of itertionsbatch_size
: No. of samples per batch
Results:
The perceptron converges at 15th epoch when initial weihgts are set at (1, 1)
Training
python -m train_digit_recognizer --name digits --epochs 400 --train --mode numpy
- Main Arguments
--name
: creates a directory inside the checkpoiints dir, where plots will be savedepochs
: No. of itertionsbatch_size
: No. of samples per batchnumpy
: make sure this flag is on, else the NN code will give errortrain
: if this flag is given then the network will be trained else it performs prediction on the test set
Training
python train_chart_classifier.py --epochs 100 --name cnn --mode pytorch --csvfile train_val.csv --pretrained --train
- Main Arguments
--name
: creates a directory inside the checkpoiints dir, where plots will be savedepochs
: No. of itertionsbatch_size
: No. of samples per batchpretrained
: loads pretrained VGG model. If this flag is not given then a 2-layer CNN will be trained from scratchpytorch
: make sure this flag is on, else the CNN code will give errorcsvfile
: name of the csvfiledataroot
: path to charts charts datafolderimgdir
: name of the directory; either train-val or testcheckpoints_dir
: path to the directory containing all checkpoints