def loop_cond(i, decoded_ids, unused_logprobs):
    """Loop conditional that returns false to stop loop."""
    return tf.logical_and(
        tf.reduce_all(tf.not_equal(decoded_ids, target_end_id)),
        tf.less(i, decode_length))
Loop conditional that returns false to stop loop.
language/xsp/model/transformer.py