GithubHelp home page GithubHelp logo

elefhead / digit_recognition Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 11.27 MB

Fully connected neural network for digit classification using MNIST data

Python 100.00%
python3 neural-networks tensorflow numpy amsgrad rmsprop adam-optimizer momentum he-initializer mnist

digit_recognition's Introduction

MNIST Digit Recognition

Fully connected neural networks for handwritten digit classification using MNIST data

Description

Layers : 3 ( 200, 200, 10 )
Optimization : AMSGrad
Weight Initialization : He-normal
Regularization : L2
Activation : ( elu, elu, softmax )
Cost Function : Categorical cross-entropy
Total epochs : 100
Batch size : 250

Performance

Here are some performance stats using various optimizers:

Optimization Training Accuracy Testing Accuracy
Momentum 0.586 0.584
RMSProp 0.9870 0.9679
AMSGrad 0.9975 0.9743
ADAM(TensorFlow) 0.9967 0.9735

Notes

  • The latest commit has only AMSGrad. RMSProp and Momentum are present in previous commits.
  • The tensorflow code was for me to see the kind of performance I should be replicating. It uses AdamOptimization and not AMSGrad.
  • The performance stats aren't an average over x attempts, its just what I got running them once. Thus, they're not absolute or conclusive of anything and are subject to randoms. This point is specifically directed at my AMSGrad implementation vs Tensorflow's ADAM.

This was a fun exercise for me to see the impact of various optimizers and needless to say, I was absolutely blown away by the boost in performance caused by RMSProp and AMSGrad.
As another fun exercise, I have updated the repository with the tenserflow eager implementation of equivalent ADAM code.

digit_recognition's People

Contributors

elefhead avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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