Skip to content

MuhammedEssam17/MNIST-Digit-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Hand-written Digits Classification using TensorFlow

An end-to-end Deep Learning project that classifies handwritten digits (0-9) from the famous MNIST dataset using a Multi-Layer Perceptron (MLP) built with TensorFlow and Keras.


πŸš€ Project Highlights

  • High Accuracy: Reached over 97.83% accuracy on the test dataset.
  • Balanced Architecture: Optimized using a Dropout layer to robustly eliminate overfitting.
  • Production-Ready: Saves the trained model pipeline into a reusable .keras format.
  • Verification Built-In: Performs automated script tests comparing real sample labels directly with inference predictions.

πŸ“Š Dataset Structure

The MNIST dataset is automatically loaded and handled within the script:

  • Training Set: 60,000 images ($28 \times 28$ pixels)
  • Test Set: 10,000 images ($28 \times 28$ pixels)
  • Features Scaling: Pixel values normalized from [0, 255] to [0.0, 1.0] for optimal gradient descent stability.

🧠 Neural Network Architecture

The model is sequentially structured as follows:

  1. Flatten Layer: Reshapes the 2D image matrix ($28 \times 28$) into a flat 1D array of 784 pixels.
  2. Dense Hidden Layer: 128 neurons utilizing the ReLU activation function.
  3. Dropout Layer: Randomly drops out 20% of nodes during training epochs to boost generalization.
  4. Dense Output Layer: 10 neurons mapping out multi-class probability scores via Softmax.

About

A high-performance Deep Learning classifier built with TensorFlow and Keras, optimizing an MLP architecture with Dropout regularization to achieve 97.83% accuracy on the MNIST dataset.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages