This repository contains code for training a LeNet-5 like Convnet on MNIST handwritten digits.
- torch
- torchvision
- Matplotlib
- Numpy
- pandas
- tqdm
- seaborn
You can download PyTorch and torchvision from their website. Download the library depending on your system hardware (whether you have CUDA enabled device or not).
In terminal type,
$ python3 MNIST.py
This will start training the model from scratch depending on the training configurations provided. The program will also output few graphs for your analysis.
I have trained the model for 40 epochs in total. Training time was about 2 mins on my RTX 3080 GPU. However, training time depends on your hardware specifications.
The trained model is available here. This model achieves a test accuracy of 99.015% and a train accuracy of 99.56%.
MIT License