def __call__(self, input, state, scope=None):
with tf.variable_scope(scope or type(self).__name__):
inputs1, inputs2 = tf.split(value=input, num_or_size_splits=2, axis=1)
inner_function_output = self._inner_function(inputs1, state)
new_h = self._outer_function(inner_function_output, inputs2, state)
# new_c, new_h
new_c = new_h
new_h = new_h
new_state = (LSTMStateTuple(new_c, new_h))
return new_h, new_state
评论列表
文章目录