(sequence, sequence_length, time_major=True)
return tf.gather_nd(sequence, final_index)
Get the final item in a batch of sequences.
Get the final item in a batch of sequences.
Get the final item in a batch of sequences .
def get_final(sequence, sequence_length, time_major=True):
  """Get the final item in a batch of sequences."""
  final_index = _get_final_index(sequence_length, time_major)
  return tf.gather_nd(sequence, final_index)
def get_final ( sequence , sequence_length , time_major = True ) : final_index = _get_final_index ( sequence_length , time_major ) return tf . gather_nd ( sequence , final_index )