Giter Site home page Giter Site logo

chaitanyak77 / digits-classification-using-mlp Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.35 MB

This project involves using a Multilayer Perceptron (MLP) to classify handwritten digits. In this project, an MLP model is trained on a dataset of handwritten digits to recognize and classify them accurately.

License: MIT License

Jupyter Notebook 99.97% Python 0.03%
deep-learning machine-learning mnist p

digits-classification-using-mlp's Introduction

Digits-Classification-using-MLP

MNIST Digit Classification using Sequential Neural Network with Keras

This repository showcases the implementation of a Sequential Neural Network (SNN) using Keras and TensorBoard(for Visualization) for the task of MNIST digit classification. The MNIST dataset is a well-known benchmark in the field of machine learning and computer vision, consisting of 60,000 training images and 10,000 testing images of handwritten digits from 0 to 9. The goal of this project is to demonstrate the training process and the achieved accuracies of the SNN on this dataset.

Installation

To run the code provided in this repository, you'll need to have Python and the following libraries installed:

pip install numpy tensorflow matplotlib

Usage

The main code for training and evaluating the SNN can be found in the mnist_digit_classification.ipynb Jupyter Notebook. Simply run the notebook cell by cell to go through the training process, model compilation, and accuracy evaluation steps. The notebook provides detailed explanations for each step, making it suitable for both beginners and those familiar with neural networks.

Model Architecture

The Sequential Neural Network (SNN) used in this project consists of multiple layers, including input, hidden, and output layers. The input layer has 784 nodes, corresponding to the flattened 28x28 pixel input images. The hidden layers employ ReLU activation functions for introducing non-linearity, and the output layer has 10 nodes, each representing one digit class, activated using the softmax function.

Training and Accuracies

The SNN is trained using the training subset of the MNIST dataset. Various configurations, such as the number of hidden layers, the number of nodes in each hidden layer, the learning rate, and the batch size, have been experimented with to optimize the model's performance. The training process involves forward and backward propagation, weight updates using stochastic gradient descent, and the use of categorical cross-entropy as the loss function.

The model's performance is evaluated using the testing subset of the MNIST dataset. The accuracy achieved on the test data demonstrates the SNN's ability to generalize to unseen samples. The accuracy achieved may vary based on the specific architecture and hyperparameters used.

Results

After experimenting with different configurations, the SNN achieved various accuracies on the test dataset. The results are as follows:

  • Model 1: Accuracy of 92.88% with a no hidden layer.
  • Model 2: Accuracy of 97.82% with one hidden layer

Conclusion

This project demonstrates the process of building a Sequential Neural Network (SNN) using Keras for the classification of MNIST digits. By experimenting with different architectures and hyperparameters, we were able to achieve competitive accuracies on the test dataset. The code and insights provided here can serve as a foundation for further exploration and understanding of neural network models in image classification tasks.

digits-classification-using-mlp's People

Contributors

chaitanyak77 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.