RuntimeError: one_hot is only applicable to index tensor. #454
Unanswered
talhaanwarch
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Try to squeeze ground truth tensor |
Beta Was this translation helpful? Give feedback.
3 replies
-
I have the same problem. Can you ask me how to solve it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ground truth shape :
torch.Size([4, 1, 512, 512])
Predicted shape:
torch.Size([4, 59, 512, 512])
Loss:
smp.losses.DiceLoss(mode='multiclass')
Model:
I also tried removing
activation='softmax2d'
but the error is still there.Here is the complete traceback
Beta Was this translation helpful? Give feedback.
All reactions