transformer icon indicating copy to clipboard operation
transformer copied to clipboard

why dose this repo use the earlier labels as the input of Decoder?

Open qq563902455 opened this issue 4 years ago • 0 comments

''' train.py line 104
enc_inputs, enc_inputs_len = batch.src dec_, dec_inputs_len = batch.trg dec_inputs = dec_[:, :-1] dec_targets = dec_[:, 1:] dec_inputs_len = dec_inputs_len - 1 ''' In the original paper of Transformer, the input of Decoder is the earlier outputs but not labels.

qq563902455 avatar Oct 27 '20 12:10 qq563902455