Skip to content

Classification of MNIST (and variant) datasets using the LeNet5 architecture.

License

Notifications You must be signed in to change notification settings

antoine-spahr/MNIST-LeNet5-Pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST-classification-LeNet5

Goal

Classification of MNIST, FashionMNIST, KMNIST, and QMNIST datasets using the LeNet5 architecture.

Architecture

The famous LeNet5 architecture in implemented with Pytorch. It's composed of two convolutional layers (Conv + ReLU + MaxPool) followed by three fully connected layers (400-120-84-10) with ReLU and a Softmax as final activation layer. Each model is trained 10 times with different seeds (1,2,3,4,5,6,7,8,9,10)

LeNet5

Overall Performances

MNIST FashionMNIST KMNIST QMNIST
Train 99.362 ± 0.085% 89.701 ± 0.441% 98.518 ± 1.219% 99.356 ± 0.057
Test 99.445 ± 0.077% 89.495 ± 0.534% 96.255 ± 1.134% 99.328 ± 0.055

*Accuracy presented as mean ± 1.96 std


MNIST

Digit recognition (0-9) from handwritten images (28x28 grayscale). The train set contains 60'000 examples and the test set contains 10'000 examples.

Setup

The model is trained 10 times with the following parameters:

N epoch Learning rate Batch Size LR decay Optimizer
150 0.002 128 0.98 ADAM

Sample Prediction

MNIST Sample


FashionMNIST

Cloth recognition from 28x28 grayscale images. There are 10 classes (T-Shirt/Top, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, Ankle boot). The train set contains 60'000 examples and the test set contains 10'000 examples.

Setup

The model is trained 10 times with the following parameters:

N epoch Learning rate Batch Size LR decay Optimizer
150 0.002 128 0.98 ADAM

Sample Prediction

FashionMNIST Sample


KMNIST

Handwritten Japanese Hiragana recognition from 28x28 grayscale images. There are 10 Hiragana in this dataset: お (a), き (ki), す (su), つ (tu), な (na), は (ha), ま (ma), や (ya), れ (re), を (wo). The train set contains 60'000 examples and the test set contains 10'000 examples.

Setup

The model is trained 10 times with the following parameters:

N epoch Learning rate Batch Size LR decay Optimizer
150 0.002 128 0.98 ADAM

Sample Prediction

KMNIST Sample


QMNIST

Same dataset of Handwritten digits as MNIST but with more test examples. The train set contains 60'000 examples and the test set contains 60'000 examples.

Setup

The model is trained 10 times with the following parameters:

N epoch Learning rate Batch Size LR decay Optimizer
150 0.002 128 0.98 ADAM

Sample Prediction

QMNIST Sample

About

Classification of MNIST (and variant) datasets using the LeNet5 architecture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages