OpenNMT Forum

The batch will be filled until we reach 1,its size may exceed 16 tokens

Hello, congratulations for such great work.

Could you please help to understand this WARNING. Will it have any affect on the training? How can I avoid it?

I am running a transformer model with one GPU setting and a small batch size of 16.

[2020-11-21 20:29:00,185 INFO] Loading ParallelCorpus(phonemes2text_v2/src-val.txt, phonemes2text_v2/tgt-val.txt, align=None)…
[2020-11-21 20:50:33,074 INFO] Validation perplexity: 13.9302
[2020-11-21 20:50:33,074 INFO] Validation accuracy: 25.8812
[2020-11-21 20:50:44,975 WARNING] The batch will be filled until we reach 1,its size may exceed 16 tokens

This warning is triggered when using batch_type tokens, if one example has more tokens than batch_size. Do you really want to train on batches of 16 tokens? You probably meant sentences? (batch_type "sents")

1 Like