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

RuntimeError: Expected object of scaLar type Long but got scalar type FLoat for argument #2 ' target' in call to_ thnn_ nLL Loss_ forward #1

Open
ye-zero opened this issue Nov 21, 2022 · 1 comment

Comments

@ye-zero
Copy link

ye-zero commented Nov 21, 2022

image
您好,运行代码后报了如下错误:
RuntimeError: Expected object of scaLar type Long but got scalar type FLoat for argument #2 ' target' in call to_ thnn_ nLL Loss_ forward
ubunt20.04 torch1.7 torchvision0.8

@mengxianglong123
Copy link
Owner

大概率Pytorch版本原因,请自行按照提示修改代码或者更换为最新版Pytroch(1.13)

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

2 participants