GithubHelp home page GithubHelp logo

pniroula77 / mlp-training-for-mnist-classification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nipunmanral/mlp-training-for-mnist-classification

0.0 0.0 0.0 696 KB

Multilayer perceptron deep neural network with feedforward and back-propagation for MNIST image classification using NumPy

Python 100.00%

mlp-training-for-mnist-classification's Introduction

Multilayer Perceptron Training for MNIST Classification

Objective

This project aims to train a multilayer perceptron (MLP) deep neural network on MNIST dataset using numpy. The MNIST dataset of handwritten digits has 784 input features (pixel values in each image) and 10 output classes representing numbers 0–9.

Environment Setup

Download the codebase and open up a terminal in the root directory. Make sure python 3.6 is installed in the current environment. Then execute

pip install -r requirements.txt

This should install all the necessary packages for the code to run.

Dataset

The file mnist_testdata.hdf5 (not uploaded here due to size constraints) contains 10,000 images in the key ‘xdata’ and their corresponding labels in the key ‘ydata’. Each image is 784-dimensional and each label is one-hot 10-dimensional. So if the label for an image is [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], it means the image depicts a 3

Code Information

Refer to the file Different Configurations Report.pdf for details and graphs on the various configurations of the MLP.

The best accuracy was obtained using the following configuration:

  • Input Layer - 784 neurons
  • 1 Hidden layer of 512 neurons
  • Output Layer - 10 neurons
  • Batch Size – 50
  • Epoch – 50
  • Learning Rate - 0.09
  • Activation in Intermediate Layers – ReLu Activation
  • Activation in Output Layer – Softmax
  • Parameter Initialization – He Normalization
  • Final Training Accuracy : 99.99%
  • Final Test Accuracy : 98.26%

Evaluation

Models are scored on classification accuracy which is simply the number of correct classifications divided by the total number of elements in the test set.

mlp-training-for-mnist-classification's People

Contributors

nipunmanral 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.