-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensor Size Mismatch During Training #13
Comments
I've been having the same issue. However, I only encounter it when I have a large epoch number. What epoch number did you have set in the arguments? By large I mean 100,000 and so. |
I didn't set one, I just used the defaults. It seems to happen somewhat randomly. Sometimes it will get a few epochs in, other times it crashes almost immediately. |
I ran into the same problem, and it's indeed caused by this line in train.py: Subtract 1 from the right boundary should fix the problem: This is because for randint(a, b), the right boundary b is included. So if the sampler happens to select b, the error would raise because the end index is out of the file boundary. To be specific, for the following 2 lines,
the slicing operation woundn't raise an out-of-boundary error, instead, the right boundary would be set to min(file_length, end_index - 1), which would only cut out |
Fixed: spro#13
While training at a seemingly random point, it fails with this error (both lstm and gru):
I've attached the data set I've been using.
surnames.txt
The text was updated successfully, but these errors were encountered: