git clone https://github.com/KevinLikesCodingMC/PyTorch-MNIST-Tutorial.gitFirst download the MNIST dataset in CSV format and place mnist_train.csv and mnist_test.csv in the root directory:
PyTorch-MNIST-Tutorial/
├── LICENSE
├── model.pth
├── model.py
├── README.md
├── test.py
├── train.py
├── utils.py
├── demo.py
├── mnist_train.csv
└── mnist_test.csv
Then install these packages:
pip install numpy matplotlib pygameVisit PyTorch official website.
Run train.py to train and generate model model.pth.
Run test.py to test the model model.pth.
Run demo.py to watch the visual demo.