Giter Club home page Giter Club logo

self-normalizing-neural-network's Introduction

Self-Normalizing-Neural-Networks-SNN-

Implementation of Self-Normalizing Neural Networks (SNN) on MNIST dataset using Keras.

Introduction

SNNs keep the neuron activations in the network near zero mean and unit variance, by employing the following tools.

My animated logo


Accuracy

accuracy of snn vs accuracy of Batch Normalization

  • snn

My animated logo

  • Batch normalization My animated logo

  • from above graphs seeing the labels we can fighure out that SNN works better than Batch Normalization


Loss

loss of snn vs loss of Batch Normalization

  • snn(at a depth of 32)

My animated logo

  • Batch normalization (at a depth of 32 - label is wrong)

My animated logo

  • snn My animated logo

  • Batch normalization My animated logo

  • we see that the loss of snn is less than the loss of Batch Normalization and we get a smoother graph.


snippets

My animated logo

My animated logo


Process

  1. SELU activation

  2. Initialization of weights

  3. Alpha-dropout (though dropout is rarely necessary in my experience)

  4. Scale input features to zero-mean, unit variance.

Constants are chosen appropriately to be: α = 1.6733 and λ = 1.0507.

SeLu Layer (under the hood functioning)

if x>0:
    selu(x) = lambda*x
else:
    selu(x) = lambda*alpha*(exp(x)-1)

SeLu Dropout Layer (under the hood functioning)

dropout_ratio = 1 - q
if random > dropout_ratio:
    selu_drop(x) = a*(x)+b
else:
    selu_drop(x) = a*(alpha)+b

References

[1] G. Klambauer, T. Unterthiner, A. Mayr, & S. Hochreiter, Self-Normalizing Neural Networks. In I. Guyon, U.V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, & R. Garnett,eds., Advances in Neural Information Processing Systems 30 (Curran Associates, Inc., 2017), pp. 971–980.

[2] I. Yeh, Modeling of strength of high performance concrete using artificial neural networks. In Cement and Concrete Research, Vol. 28, No. 12, pp. 1797-1808 (1998).

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.