Skip to content

kinoai/MNIST-CNN

 
 

Repository files navigation

MNIST-CNN

A from-scratch implementation of the basic CNN architecture, developed by a Sekcja Sztucznej Inteligencji member Eldar Aliekpierov in 2023.

How does it work?

The core of the convolutional neural network is, as the name implies, the convolutional layer. The layer utilizes the convolution (actually, the correlation) operation to extract features and thus create feature maps of the input. Below is an illustration of how a convolution works:

Convolution operation

Apart from the convolutional layer, there are also the MaxPool and Dense layers (in my implementation, the output of each layer is activated by default, rendering the activation layer unnecessary). First, the input is correlated with the Convolutional layer kernels, then it is passed down to the MaxPool layer for it to extract the most important features out of the feature maps. Finally, the Dense layer accepts MaxPool's output and makes its prediction. Below is an illustration of how the MaxPooling operation works:

MaxPool operation

Network performance

The maximum achieved accuracy upon training on the test dataset -- 84.32%. The network's performance in greater detail is as follows:

CNN accuracy results

CNN performance

ToDo

The main goal is adding more convolutional and pooling layers, as well as trying out different loss functions. Hyperparameter optimization is also credible.

About

A simple CNN to solve the MNIST problem written from scratch .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%