sindhri / MNIST

Use 28x28 pixel images in the MNIST dataset to classify digit 0-9 via deep learning: MLP vs. CNN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MNIST digit recognition

Use 28x28 pixel images to recognize digit 0-9
Credit: Deep Learning with Python by Jason Brownlee
MNIST

baseline MLP

MLP
flattern and normalize the input
MLP with two dense layers
categorical cross entropy as the loss function, adam as the optimizer, and accuracy as the metrics.
10 epochs with batch size = 200
Baseline Error: 1.67%

simple CNN

CNN
reshape and normalize the input
simple CNN with 1 convolutional layer, 1 pooling, 1 dropout, 1 flattern, 2 dense layers
Much slower than MLP
categorical cross entropy as the loss function, adam as the optimizer, and accuracy as the metrics.
10 epochs with batch size = 200
CNN Error: 1.09% reduced error rate

larger CNN

CNN2
larger CNN with 2 convolutional+pooling layers, 1 dropout, 1 flattern, 3 dense layers Much slower than MLP
categorical cross entropy as the loss function, adam as the optimizer, and accuracy as the metrics.
10 epochs with batch size = 200
Large CNN Error: 0.77%, improved!

About

Use 28x28 pixel images in the MNIST dataset to classify digit 0-9 via deep learning: MLP vs. CNN


Languages

Language:Jupyter Notebook 100.0%