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

Encounter the problem "IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number", when I tried to train on HMDB51. #40

Closed
ZealACMer opened this issue Dec 28, 2018 · 4 comments

Comments

@ZealACMer
Copy link

To be more specific, when I tried to use the following commands:
image
I encountered the problem as shown in the following pic:
image
I have not find the appropriate solution for this problem, can you help me? Thank you very much.

@ZealACMer
Copy link
Author

When I tried to change loss.data[0] to loss.item(), but encountered another problem, error message is shown as follows:
image

How can I solve this, thank you very much.

@ZealACMer
Copy link
Author

I have solved this problem, thank you every much.

@yellowjs0304
Copy link

@ZealACMer Hi, How did you resolve the problem? I encountered same issue.

@abhijeeetkumar
Copy link

What was the fix?

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