def next_inputs(self, time, sample_ids, prev_finished):
finished = math_ops.logical_or(
tf.greater_equal(time + 1, tf.maximum(self.max_step,
self.max_sequence_length)),
tf.equal(self.eos_id, sample_ids))
next_finished = math_ops.logical_or(finished, prev_finished)
return next_finished, self.lookup(sample_ids)
评论列表
文章目录