Skip to content

PyTorch implementation for training a LeNet-5 like Convnet on MNIST digits

License

Notifications You must be signed in to change notification settings

iVishalr/MNIST-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST - PyTorch

MNIST digits

This repository contains code for training a LeNet-5 like Convnet on MNIST handwritten digits.

Requirements

  1. torch
  2. torchvision
  3. Matplotlib
  4. Numpy
  5. pandas
  6. tqdm
  7. 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).

Execution

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.

Training the Model

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%.

Some eye pleasing stuffs

MNIST digits

MNIST digits

MNIST digits

MNIST digits

MNIST digits

MNIST digits

License

MIT License

About

PyTorch implementation for training a LeNet-5 like Convnet on MNIST digits

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages