Last active
February 24, 2016 16:29
-
-
Save ericjang/8dbcf722f429bb0112c4 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
# encoder | |
from tensorflow.models.rnn.rnn_cell import LSTMCell | |
read_size = 2*read_n*read_n if FLAGS.read_attn else 2*img_size | |
lstm_enc = LSTMCell(enc_size, read_size+dec_size) # encoder Op | |
def encode(state,input): | |
with tf.variable_scope("encoder",reuse=DO_SHARE): | |
return lstm_enc(input,state) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment