Skip to content

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

@qq563902455

Description

@qq563902455

''' 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions