예제 #1
0
 def LoopContinue(cur_step, unused_step_ids, unused_hyp_ids,
                  unused_hyp_lens, done_hyps, unused_other_states_list):
     return tf.logical_and(cur_step < max_steps,
                           tf.logical_not(tf.reduce_all(done_hyps)))
예제 #2
0
 def LoopContinue(cur_step, all_done, unused_step_ids, unused_core_bs_states,
                  unused_other_states_list):
   return tf.logical_and(cur_step < max_steps, tf.logical_not(all_done))
예제 #3
0
 def StopFn(recurrent_theta, state, inputs):
     del recurrent_theta, inputs
     return tf.logical_not(
         tf.reduce_all(tf.equal(state.ids, p.target_eos_id)))