-
Notifications
You must be signed in to change notification settings - Fork 83
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 #4
Comments
This is with python3. If I try with python2 I get:
|
What Pytorch version you are using? |
Thanks for the quick reply! |
You will need pytorch 0.2.0 to run our code and replicate the results. |
I'd like an update is possible |
I'm also interested. Is it possible to easily fix the code to work with the latest pytorch version ? Thanks! |
Hi ,
|
Has this been fixed? I think the problem is the function never finds a Variable and it recurses all the way to the single element in a tensor. |
I think the answer is to use isinstanceof instead of type in repackage_hidden
|
I think this should be fairly easy to fix, but sorry that we don't have time for this at this point. You are welcome to initiate a pull request. |
resolved by #9 |
Execuse me, I got the same error today, could you tell me any method to solve it? thank you! |
this solved my problem. thank you so much! |
Hello! I'm running into an issue with training the Penn Treeback model:
python main.py --data data/penn --dropouti 0.4 --dropoutl 0.29 --dropouth 0.225 --seed 28 --batch_size 12 --lr 20.0 --epoch 1000 --nhid 960 --nhidlast 620 --emsize 280 --n_experts 15 --save PTB --single_gpu
The text was updated successfully, but these errors were encountered: