(ctx, cache, probs)
| 784 | return [new_ids, new_cache, new_probs] |
| 785 | |
| 786 | def cond(ctx, cache, probs): |
| 787 | # ctx = tf.Print(ctx,[tf.shape(ctx)]) |
| 788 | # print('kkkkkkkkkkkkk') |
| 789 | # print(ctx[:,-1:]) |
| 790 | is_eos = tf.reduce_all(tf.reduce_any(tf.equal(ctx[:,-1:], eos_token), axis=1)) |
| 791 | # print('-----------------') |
| 792 | # print(is_eos) |
| 793 | is_len = tf.greater(get_shape_list(ctx)[1], min_len) |
| 794 | return tf.logical_not(tf.logical_and(is_eos, is_len)) |
| 795 | |
| 796 | tokens, cache, probs = tf.while_loop( |
| 797 | cond=cond, body=body, maximum_iterations=1025 - get_shape_list(ctx)[1], |
nothing calls this directly
no test coverage detected