def cond(self, time, inp, state, finished, output_ta):
"""Logical contidion for termination."""
continuation = tf.logical_not(tf.reduce_all(finished))
if self._pad_to is None:
return continuation
padding = time < self._pad_to
return tf.logical_or(continuation, padding)
# pylint: disable=W0221,I0011
# disable the changed signature of the method.
评论列表
文章目录