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

How to fix the problem:IndexError: Target 36 is out of bounds. #2

Open
Candy555 opened this issue Nov 11, 2020 · 2 comments
Open

How to fix the problem:IndexError: Target 36 is out of bounds. #2

Candy555 opened this issue Nov 11, 2020 · 2 comments

Comments

@Candy555
Copy link

Hello,I run the code and I have met the problem IndexError: Target 36 is out of bounds.Would you please teach me how to fix the problem?Thank You.

@ThanhDucPham
Copy link
Owner

ThanhDucPham commented Nov 25, 2020

Hi, have you solved your issue? This problem can cause by the problem of the number classes. Let's check out :
https://stackoverflow.com/questions/60469220/pytorch-is-throwing-out-of-bounds-error-expects-a-scalar
https://discuss.pytorch.org/t/target-40-is-out-of-bounds-for-nn-crossentropyloss/79338

@liuyuxue97
Copy link

I had the same error, how did you fix it?

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