The purpose of padding cur_output tokens in UNQ6

Can someone please explain the utility of these two below lines when there is already shift right in NMTAttn for padding the SOS token?

pad cur_output_tokens up to the padded_length

padded = cur_output_tokens + #Correct code here

Hey @Kanishka_Mukherjee,
The ShiftRight that is used in the model is to account for teacher forcing. It doesn’t have any relation with padding of the inputs, which is basically appending the padding tokens to the end of each input, so that all the inputs in a batch have the same length, for the purposes of parallelization. Let us know if this helps.