def _step(self, f, z, o):
with tf.variable_scope("fo-Pool"):
# f,z,o is batch_size x size
f = tf.sigmoid(f)
z = tf.tanh(z)
o = tf.sigmoid(o)
self.c = tf.mul(f, self.c) + tf.mul(1 - f, z)
self.h = tf.mul(o, self.c) # h is size vector
return self.h
评论列表
文章目录