transformer
transformer copied to clipboard
why dose this repo use the earlier labels as the input of Decoder?
''' 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.