@nave01314 The source_sequence_length and decoder_lengths for training are calculated before we pad the source sequence and the target sequence. You can checkout the code here for getting the sequence length.
It is very common to pad sequential data, so dynamic_rnn can evaluate the full batch until the max sequence length in the batch. Note that the inputs to dynamic_rnn has to be a tensor with shape [batch_size, max_time, ...].
@oahziur i still cannot control the length of decode sequence even i set the tgt_max_len. I spend lots of time to find the wrappers about this parameter, can you help me ?
@nave01314 The
source_sequence_length
anddecoder_lengths
for training are calculated before we pad the source sequence and the target sequence. You can checkout the code here for getting the sequence length.It is very common to pad sequential data, so
dynamic_rnn
can evaluate the full batch until the max sequence length in the batch. Note that the inputs todynamic_rnn
has to be a tensor with shape [batch_size, max_time, ...].