Skip to content

Instantly share code, notes, and snippets.

@hadifar
Last active December 6, 2018 23:16
Show Gist options
  • Save hadifar/4a6195835d618b163e866e0ea6cde2f9 to your computer and use it in GitHub Desktop.
Save hadifar/4a6195835d618b163e866e0ea6cde2f9 to your computer and use it in GitHub Desktop.
Wd1 = tf.get_variable(name='dense1', shape=(rnn_size, 16))
Wd2 = tf.get_variable(name='dense2', shape=(rnn_size, 2))
dense1 = tf.nn.relu(tf.matmul(last_rnn_output, Wd1))
dense2 = tf.matmul(dense1, Wd2))
pred = tf.nn.softmax(dense2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment