Created
December 6, 2018 22:49
-
-
Save hadifar/1a0dbe2a1bd443258831ac0b8e5ca64f to your computer and use it in GitHub Desktop.
This file contains 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
# our RNN variables | |
Wx = tf.get_variable(name='Wx', shape=[embedding_size, rnn_size]) | |
Wh = tf.get_variable(name='Wh', shape=[rnn_size, rnn_size]) | |
bias_rnn = tf.get_variable(name='brnn', initializer=tf.zeros([rnn_size])) | |
def rnn_step(prev_hidden_state, x): | |
return tf.tanh(tf.matmul(x, Wx) + tf.matmul(prev_hidden_state, Wh) + bias_rnn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment