Created
March 26, 2019 09:39
-
-
Save chricke/be7843e8945e56a0e0e4d68d978d88cf to your computer and use it in GitHub Desktop.
Create an RNN Cell and initialize it
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
def get_init_cell(batch_size, rnn_size): | |
lstm = tf.contrib.rnn.GRUCell(rnn_size) | |
cell = tf.contrib.rnn.MultiRNNCell([lstm]) | |
initial_state = tf.identity(cell.zero_state(batch_size, tf.float32), name='initial_state') | |
return cell, initial_state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment