Git Product home page Git Product logo

mnist_cnn's Introduction

mnist_cnn

Implements a Convolutional Neural Network to classify handwritten digits from the MNIST dataset.

Network structure

There is 5 total neural layers in this network:

  • A conv input layer, taking in 1 channel (MNIST data is grayscale, hence only 1 channel)
  • Hidden conv layer 1, which takes in 16 channels
  • Hidden conv layer 2, which takes in 64 channels
  • Hidden conv layer 3, which takes in 85 channels
  • A fully connected layer for classification (10 outputs, digits 0 - 9 in the MNIST set)

All of the convolutional layers use the ReLU activation function, and all of the convolutional layers implement dropout as well.

The first two neural layers (input layer and hidden layer 1) have max pooling layers.

Results

The hyperparameters used for the network training were:

  • 65 epochs
  • Initial learning rate of 0.001
  • Batch size of 64
  • Dropout chance of 25%

I also used a learning rate scheduler to reduce the learning rate after several epochs with no decrease in loss.

  • Factor of 0.1
  • Patience of 3 epochs

With all this, I was able to achieve 100% accuracy on the training set, and 99.51% on the test set.

Improvements

I am sure that with the implementation of data augmentation, the accuracy of the network will continue to improve.

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.