All Projects → hwalsuklee → tensorflow-mnist-MLP-batch_normalization-weight_initializers

hwalsuklee / tensorflow-mnist-MLP-batch_normalization-weight_initializers

Licence: other
MNIST classification using Multi-Layer Perceptron (MLP) with 2 hidden layers. Some weight-initializers and batch-normalization are implemented.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tensorflow-mnist-MLP-batch normalization-weight initializers

DeepLearning-PadhAI
All the code files related to the deep learning course from PadhAI
Stars: ✭ 88 (+79.59%)
Mutual labels:  he-initializer, xavier-initializer
KerasMNIST
Keras MNIST for Handwriting Detection
Stars: ✭ 25 (-48.98%)
Mutual labels:  mnist, mnist-classification
gans-2.0
Generative Adversarial Networks in TensorFlow 2.0
Stars: ✭ 76 (+55.1%)
Mutual labels:  mnist, mnist-classification
numpy-neuralnet-exercise
Implementation of key concepts of neuralnetwork via numpy
Stars: ✭ 49 (+0%)
Mutual labels:  mnist, xavier-initializer
robomaster mnist
[RoboMaster2017] Handwritten numerals and digital tube recognition.
Stars: ✭ 32 (-34.69%)
Mutual labels:  mnist-classification
Handwritten Digit Recognition
手写数字识别。利用Tensorflow和MNIST实现的一个简单的手写数字识别程序。
Stars: ✭ 22 (-55.1%)
Mutual labels:  mnist
MNIST-CoreML
Predict handwritten digits with CoreML
Stars: ✭ 63 (+28.57%)
Mutual labels:  mnist
Gordon cnn
A small convolution neural network deep learning framework implemented in c++.
Stars: ✭ 241 (+391.84%)
Mutual labels:  mnist
pytorch-siamese-triplet
One-Shot Learning with Triplet CNNs in Pytorch
Stars: ✭ 74 (+51.02%)
Mutual labels:  mnist
Hand-Digits-Recognition
Recognize your own handwritten digits with Tensorflow, embedded in a PyQT5 GUI. The Neural Network was trained on MNIST.
Stars: ✭ 11 (-77.55%)
Mutual labels:  mnist
Bounding-Box-Regression-GUI
This program shows how Bounding-Box-Regression works in a visual form. Intersection over Union ( IOU ), Non Maximum Suppression ( NMS ), Object detection, 边框回归,边框回归可视化,交并比,非极大值抑制,目标检测。
Stars: ✭ 16 (-67.35%)
Mutual labels:  mnist
handwritten-digit-recognition-tensorflowjs
In-Browser Digit recognition with Tensorflow.js and React using Mnist dataset
Stars: ✭ 40 (-18.37%)
Mutual labels:  mnist
tensorflow-example
Tensorflow-example:使用MNIST训练模型,并识别手写数字图片
Stars: ✭ 26 (-46.94%)
Mutual labels:  mnist
VAE-Latent-Space-Explorer
Interactive exploration of MNIST variational autoencoder latent space with React and tensorflow.js.
Stars: ✭ 30 (-38.78%)
Mutual labels:  mnist
CNN-MNIST
CNN classification model built in Keras used for Digit Recognizer task on Kaggle (https://www.kaggle.com/c/digit-recognizer)
Stars: ✭ 23 (-53.06%)
Mutual labels:  mnist
catacomb
The simplest machine learning library for launching UIs, running evaluations, and comparing model performance.
Stars: ✭ 13 (-73.47%)
Mutual labels:  mnist
Awesome Tensorlayer
A curated list of dedicated resources and applications
Stars: ✭ 248 (+406.12%)
Mutual labels:  mnist
digitRecognition
Implementation of a digit recognition using my Neural Network with the MNIST data set.
Stars: ✭ 21 (-57.14%)
Mutual labels:  mnist
adversarial-autoencoder
Tensorflow 2.0 implementation of Adversarial Autoencoders
Stars: ✭ 17 (-65.31%)
Mutual labels:  mnist
Pytorch-PCGrad
Pytorch reimplementation for "Gradient Surgery for Multi-Task Learning"
Stars: ✭ 179 (+265.31%)
Mutual labels:  mnist

Various initializers and batch normalization

An implementation of weight/bias initializers and batch normalization in Tensorflow.

MNIST database is used to show performance-comparison

Network architecture

In order to examine the effect of initializers and batch normalization, a simple network architecture called multilayer perceptrons (MLP) is employed.

MLP has following architecture.

  • input layer : 784 nodes (MNIST images size)
  • first hidden layer : 256 nodes
  • second hidden layer : 256 nodes
  • output layer : 10 nodes (number of class for MNIST)

Various initializers

The following initializers for weights/biases of network are considered.

Simulation results

  • Weight Initializer : he > trauncated normal = xaiver > normal
  • Bias Initilaizer : zero > normal

Sample results are following.

weight_init

Index Weight Initializer Bias Initializer Accuracy
normal_w_normal_b_0.9451 normal normal 0.9451
normal_w_zero_b_0.9485 normal zero 0.9485
truncated_normal_w_normal_b_0.9788 truncated_normal normal 0.9788
truncated_normal_w_zero_b_0.9790 truncated_normal zero 0.9790
xavier_w_normal_b_0.9800 xavier normal 0.9800
xavier_w_zero_b_0.9806 xavier zero 0.9806
he_w_normal_b_0.9798 he normal 0.9798
he_w_zero_b_0.9811 he zero 0.9811

Batch normalization

Batch normalization improves performance of network in terms of final accuracy and convergence rate.
In this simulation, bias initalizer was zero-constant initializer and weight initializers were xavier / he.

Sample results are following.

batch_norm

Index Weight Initializer Batch Normalization Accuracy
xavier_woBN_0.9806 xavier Unused 0.9806
xavier_withBN_0.9812 xavier Used 0.9812
he_woBN_0.9811 he Unused 0.9811
he_withBN_0.9837 he Used 0.9837

Usage

python run_main.py --weight-init <weight initializer> --bias-init <bias initializer> --batch-norm <True or False>

<weight initializer> must be selected in [normal, truncated_normal, xavier, he].
<bias initializer> must be selected in [normal, zero].

You may command like python run_main.py --weight-init xavier --bias-init zero --batch-norm True.

Acknowledgement

This implementation has been tested on Tensorflow r0.12.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].