pytorch-seq2seq icon indicating copy to clipboard operation
pytorch-seq2seq copied to clipboard

Possible Inaccuracies in training script

Open rrmina opened this issue 2 years ago • 0 comments

Hi Ben! Thanks for sharing this wonderful tutorial!

I have a question about the training script of 5. Convolutional Seq2Seq. In train(), the model accepts src and trg[:,:-1] to drop the <EOS> tokens. However, wouldn't it be inaccurate to just drop the last column if the batch of trg consists of sentences of varying length. In case of varying lengths, some sentences' last column may not be <EOS> token but rather <PAD> token.

Regards,

P.S. added a screenshot to easily refer

rrmina avatar Jun 27 '22 05:06 rrmina