SamLynnEvans / Transformer

Transformer seq2seq model, program that can build a language translator from parallel corpus
Apache License 2.0
1.35k stars 350 forks source link

what's the shape of the padding mask? #28

Open cswwp opened 3 years ago

cswwp commented 3 years ago

Thanks for sharing so great repo, and one question: what's the shape of the padding mask? and how i construct my padding mask with custom dataset? such as now my padding mask is [ [1,1,1,1,0,0,0], [1,1,0,0,0,0,0], [1,1,1,1,1,1,0], [1,1,1,1,1,1,1] ] but i give to encoder.forward, it shows runtime errror, anyone can help me? @SamLynnEvans