OpenNMT Forum

RuntimeError: Length of all samples has to be greater than 0, but found an element in 'lengths' that is <= 0

please help me out and suggest better option ??

You might need to be more specific. Tagging every project is not the way. This error has to happen in a specific project.
Anyways, did you check your data? It seems there might be some empty lines.

It looks like this issue:

1 Like

Thanks for suggesting, from the next question I will remember.