Git Product home page Git Product logo

stream-norm's Introduction

The code is in "tensorflow" folder

The paper is:
https://arxiv.org/abs/1610.06160

TF: TensorFlow

The main question I'd like to figure out:
In tensorflow/streaming.py, I define a new OP (TF opearation) in the streaming function:

py_func_with_grad(lambda x, s: s, [x, s_final], [tf.float32], name=name, grad=lambda op,grad: stream_gradient_backprop(op,grad, scope.name ,beta,kappa))

The forward part of this OP is identity: f(x,s) = s, I use two parameters, since I want the gradient goes to x, instead of s. But I want to use the value of s in the forward prop.

The backprop part of this OP is defined in the function:  stream_gradient_backprop: It gets some TF variables by tf.get_variable, modify them in some way and store them back (using "update_streaming" function). I am not sure how TensorFlow deal with the computations defined in this backprop function. 

To run the code involving streaming normalization:
python mnist.py --hidden 100 --cell_type SNGRU --dau 20 --batch_size 5

To run the baseline code:
python mnist.py --hidden 100 --cell_type LNGRU --dau 20 --batch_size 5


The streaming normalization should work at least as well as the baseline. But since I do not know what TensorFlow does in the backprop part, I cannot debug..  


stream-norm's People

Stargazers

 avatar  avatar

Watchers

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