Created
November 18, 2016 14:44
-
-
Save 3h4/a353c663eebd0d2e7c64e9f97fa62aee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Forward pass | |
current_state = init_state | |
states_series = [] | |
for current_input in inputs_series: | |
current_input = tf.reshape(current_input, [batch_size, 1]) | |
input_and_state_concatenated = tf.concat(1, [current_input, current_state]) # Increasing number of columns | |
next_state = tf.tanh(tf.matmul(input_and_state_concatenated, W) + b) # Broadcasted addition | |
states_series.append(next_state) | |
current_state = next_state | |
orian
commented
May 12, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment