Skip to content

PyTorch implementation of image classification models for MNIST

License

Notifications You must be signed in to change notification settings

lh9171338/MNIST-Classify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST Classify

Introduction

The repository contains the PyTorch implementation of image classification models for MNIST dataset, based on MLP, CNN, RNN, LSTM, and GRU.

Results

Metrics

Model #FLOPs (M) #Params (K) Acc (%)
RNN 0.3 6.5 94.4
LSTM 1.3 24.1 98.5
GRU 1.0 18.3 98.9
MLP 0.5 238.0 98.7
CNN 0.6 43.8 99.3

Loss & Accuracy Curves

Requirements

pip install -r ./requirements.txt

Training & Testing

Training

python train.py --arch <ARCH> [--model_name <MODEL_NAME>] [--gpu <GPU_ID>]

Test

# Test one model
python test.py --arch <ARCH> [--model_name <MODEL_NAME>] [--gpu <GPU_ID>]

# Test all models
./run.sh

About

PyTorch implementation of image classification models for MNIST

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published