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

nn.cross Entropy error #3677

Open
anamce opened this issue May 21, 2024 · 0 comments
Open

nn.cross Entropy error #3677

anamce opened this issue May 21, 2024 · 0 comments

Comments

@anamce
Copy link

anamce commented May 21, 2024

If anybody encountered this issue when run swin transformer please let me know I need your guidance

line 3086, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: only batches of spatial targets supported (3D tensors) but got targets of size: : [2, 512, 512, 3]

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

1 participant