What's wrong with my train.py?


(Patrick Liu) #1

I run perprocess.py and then run train.py. When it run at Epoch 1, 150/ 157,it stop.
I didn’t change the code.


(Patrick Liu) #2

(jean.senellart) #3

Could you copy the error log as text (not as image) so that we can see it completely?

(Patrick Liu) #4
raise ValueError("lengths array has to be sorted in decreasing order")

ValueError: lengths array has to be sorted in decreasing order

(Zijia) #5

I guess it is because of valid_iter. There is a bug there. I mentioned it here. It seems not fixed.

(Mr. Lin) #6

use pytorch text v0.1.1 instead of pytorch text v0.2
source code: https://github.com/pytorch/text/archive/v0.1.1.tar.gz

it works for me.