Skip to content

Leoh10/pytorch-cnn-mnist

 
 

Repository files navigation

PyTorch-CNN-MNIST

This repo contains a sample code to show how to create a cnn model using pytorch and trained on the mnist.

Demo

http://pytorch-cnn-mnist.herokuapp.com/

Install

Install pytorch and other necessary module (tensorboard and matplotlib).

pip install -r requirements.txt

Train

Run train.py to train your cnn model on mnist dataset.

python train.py

Test

Run test.py to test the trained model on your own handwritten digit.

python test.py

Deploy

Deploy

  1. register an account of heruku
  2. create an app on heruku
  3. push the deploy folder to heroku master

Blog

Learn more about training, read the following article written in Chinese

https://blog.csdn.net/qq_42951560/article/details/109565625

Cite

https://github.com/avinassh/pytorch-flask-api-heroku
https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html

About

Handwritten digit recognition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.0%
  • HTML 21.6%
  • JavaScript 21.4%