translate
translate copied to clipboard
RNN decode results are batch-size dependent
Using an RNN model (similar to the example architecture), smaller batch sizes produce better results with generate.py. It looks like a padding error, the best results occur with a batch size of 1 (no batching).
I attempted to reproduce with the example scripts but that model seems out of date and would not run.
This issue seems to be caused by the recent left/right padding changes in fairseq code. When batch size gets bigger, sentences have more padding in them since they are grouped together. I will send a patch to fix this soon.
Addressed by #323