Comments (2)
This is in the vanilla RNN
from dynamic-tensorflow-tutorial.
Hello @bikachu,
@KnHuq is using tf.scan()
to iterate through time steps in the data and compute hidden state. If you take a look at the method vanilla_rnn()
of the class, you would notice hidden states being computed for a single time step. This method is passed to tf.scan()
as the function.
The first argument in method definition is previous_hidden_state
h(t-1). tf.scan()
initializes this with initial_hidden
which is created in the __init__()
. The computed current_hidden_state
is h(t).
Second argument x
, which would take the shape (# samples, input_dim) is unwrapped by tf.scan()
from self.processed_input
(time_step, # samples, input_dim) along the first dimension, hence he has reshaped the data to have the first dimension as the time step. vanilla_rnn()
would be run for each x
, which is the time step and hidden states are computed.
He is considering each column of pixels in an MNIST image as one time step.
from dynamic-tensorflow-tutorial.
Related Issues (7)
- process_batch_input_for_RNN could be shortened? HOT 4
- what is the difference between your dynamic implemetion of rnn and tf.nn.dynamic_rnn function ? HOT 3
- AttributeError: 'module' object has not attribute 'scan' HOT 1
- Please help with Neural Stack Machine HOT 1
- Run your repo in tensorflow 1.1.0 HOT 1
- Can not run your repo in tensorflow 1.3.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamic-tensorflow-tutorial.