Skip to content
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 #8

Open
km1994 opened this issue May 18, 2018 · 2 comments
Open

TypeError: iteration over a 0-d tensor #8

km1994 opened this issue May 18, 2018 · 2 comments

Comments

@km1994
Copy link

km1994 commented May 18, 2018

I'm run your code,but it did't work and had a error .What should i do?

Traceback (most recent call last):
File "main_pf.py", line 196, in
train()
File "main_pf.py", line 156, in train
hidden = repackage_hidden(hidden)
File "main_pf.py", line 126, in repackage_hidden
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in repackage_hidden
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in repackage_hidden
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in repackage_hidden
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in
return tuple(repackage_hidden(v) for v in h)
File "main_pf.py", line 126, in repackage_hidden
return tuple(repackage_hidden(v) for v in h)
File "/root/anaconda3/lib/python3.6/site-packages/torch/tensor.py", line 360, in iter
raise TypeError('iteration over a 0-d tensor')
TypeError: iteration over a 0-d tensor

@BuaaAlban
Copy link

have you solved the problem?

@vanzytay
Copy link
Owner

@BuaaAlban No, this repository is not maintained anymore. I just made it for fun to try out pytorch when it came out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants