Code Monkey home page Code Monkey logo

layernorm_gru's Introduction

LayerNorm GRU

Table of contents

Introduction and environment

Why we need LayerNorm

Activation functions, such as tanh and sigmoid have saturation area, as showed the their first derivatives.

Sigmoid and hyperbolic tangent (tanh) First derivatives

For the values outside (-4, +4), the output will be very close to zero, and their gradients might also vanish, incurring the gradient vanishing problem.

What is LayerNorm in GRU

The structure of a GRU cell

has two tanh and one sigmoid function. The following show the mathematical equations for original GRU and LayerNorm GRU.
Original GRU LayerNorm GRU

For more insight, where we simulate two extreme distributions of data and show the before and after effect of LayerNorm.

Before LayerNorm After LayerNorm

After passing them into LayerNorm, the new distributions lie inside (-4, +4), perfect working area for activation functions.

How does it improve our model

The result from one of my GRU models in BCI.

References

Ba, Jimmy Lei, Jamie Ryan Kiros, and Geoffrey E. Hinton. "Layer normalization." arXiv preprint arXiv:1607.06450 (2016)

layernorm_gru's People

Contributors

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