Coder Social home page Coder Social logo

mnist-alexnet-using-tensorflow's Introduction

MNIST-AlexNet-Using-Tensorflow

Using AlexNet neural networks for the classic dataset MNIST

Overview

MNIST ("Modified National Institute of Standards and Technology") is the de facto “hello world” dataset of computer vision. Since its release in 1999, this classic dataset of handwritten images has served as the basis for benchmarking classification algorithms. This dataset is made up of images of handwritten digits, 28x28 pixels in size.

In this repertoire, I created AlexNet network in tensorflow to perform on the mnist dataset. AlexNet is a helpful deep convolutional network for image recognition task, which significantly outperformed all the prior competitors and won the challenge ILSVRC 2012 by reducing the top-5 error from 26% to 15.3%. The network architecture presents image below.

image

For more details on the underlying model please refer to the following paper:

@incollection{NIPS2012_4824,
  title = {ImageNet Classification with Deep Convolutional Neural Networks},
  author = {Alex Krizhevsky and Sutskever, Ilya and Hinton, Geoffrey E},
  booktitle = {Advances in Neural Information Processing Systems 25},
  pages = {1097--1105},
  year = {2012}
}

Requirement

  • Python 3.6
  • Tensorflow >= 1.14
  • matplotlib 3.1.1

Contents

  • model.py: Class with the graph definition of the AlexNet.
  • layers.py: Neuron network layers containing convolutional layer, full collection layer, normalization and maxpooling.
  • evals.py: Model evaluation's function.
  • train.py: Script to run the training process.
  • images/*: contains three example images.
  • outputs: output result folder containing two sub-folder (accuracy_loss and model)

Usages

First, I strongly recommend to take a look at the entire code of this repository. In fact, even Tensorflow and Keras allow us to import and download the MNIST dataset directly from their API. Therefore, I will start with the following two lines to import tensorflow and MNIST dataset under the Tensorflow API. A local training job can be run with the following command:

python train.py \
    --valid_steps=11 \
    --max_steps=1001 \
    --batch_size=128 \
    --base_learning_rate=0.001 \
    --input_shape=784 \
    --num_classes=10 \
    --keep_prob=0.75 \
    --save_dir='./outputs' \
    --tb_path='./tb_logs' 

mnist-alexnet-using-tensorflow's People

Contributors

qzhao19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

spider8801

mnist-alexnet-using-tensorflow's Issues

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.