facebookresearch/fairseq

key_padding_mask is not used in transformer decoder layer?

Open

#537 aberto em 27 de fev. de 2019

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Python (6.224 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (29.107 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

when reading the source code i found that key_padding_mask is not used when calculating self attention. There is no problem when the target is padded right by default because attn_mask could do the same thing. But how about left padding on the target?

Guia do colaborador