makcedward / nlpaug

Data augmentation for NLP
https://makcedward.github.io/
MIT License
4.43k stars 462 forks source link

Error of BackTranslationAug() method #238

Closed Kelvin-Ho closed 2 years ago

Kelvin-Ho commented 3 years ago

I'm using BackTranslationAug to create data augmentation. I put a list of text into a loop and get backtranslation one by one. The previous 31 texts can be back-translated successfully but when I come to the 32nd text an error pop-up. Coud you please point out what's problem ? 82369708 1194477704 111655846

makcedward commented 3 years ago

Tried to simulate the problem but cannot reproduce it. Is it happen every time in the last batch of data? May you share data if possible?

DrMatters commented 3 years ago

Tried to simulate the problem but cannot reproduce it. Is it happen every time in the last batch of data? May you share data if possible?

He wrote that he uses batch_size=32, but runs augmentations on a single element.

makcedward commented 3 years ago

Finally, I was able to reproduce it but I cannot explain. Try to avoid using Helsinki-NLP model. Tried not to use Helsinki-NLP model and it works well. image image

DrMatters commented 3 years ago

Is this error consistent?

makcedward commented 3 years ago

Yes, it is. Once switching to other translation models, the error gone