-
Notifications
You must be signed in to change notification settings - Fork 494
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
TypeError: iteration over a 0-d tensor #25
Comments
debugging this a bit, it calls utils.detatch() and ends up at:
So since it's a scalar and the dim is 0 it's going to raise a type error:
|
If I'm understanding the response to this issue: #22 |
Just an FYI for folks wanting to run this code under versions of Pytorch >= 0.4.0: In trainer.py you should not use the call to utils.detach() - instead you should call detach_() on hidden: Change from:
to:
|
I resolved this error by changing that function in lstm_rnn fastai file |
I tried running:
python main.py --network_type rnn --dataset ptb --controller_optim adam --controller_lr 0.00035 --shared_optim sgd --shared_lr 20.0 --entropy_coeff 0.0001
But got:
Running Pytorch 0.4.1 on Python 3.7 (also tried on python 3.6.6, pytorch 0.4.1 and had same issue)
The text was updated successfully, but these errors were encountered: