in encoder.py [0:0]
def model(X, S, M=None, reuse=False):
nsteps = X.get_shape()[1]
cstart, hstart = tf.unstack(S, num=hps.nstates)
with tf.variable_scope('model', reuse=reuse):
words = embd(X, hps.nembd)
inputs = tf.unstack(words, nsteps, 1)
hs, cells, cfinal, hfinal = mlstm(
inputs, cstart, hstart, M, hps.nhidden, scope='rnn', wn=hps.rnn_wn)
hs = tf.reshape(tf.concat(hs, 1), [-1, hps.nhidden])
logits = fc(
hs, hps.nvocab, act=lambda x: x, wn=hps.out_wn, scope='out')
states = tf.stack([cfinal, hfinal], 0)
return cells, states, logits