translate icon indicating copy to clipboard operation
translate copied to clipboard

RNN decode results are batch-size dependent

Open shane-carroll opened this issue 7 years ago • 2 comments

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.

shane-carroll avatar Jan 28 '19 18:01 shane-carroll

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.

halilakin avatar Jan 31 '19 23:01 halilakin

Addressed by #323

halilakin avatar Feb 04 '19 23:02 halilakin