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

ceDiceloss #83

Open
xiaogege1210 opened this issue Oct 22, 2024 · 4 comments
Open

ceDiceloss #83

xiaogege1210 opened this issue Oct 22, 2024 · 4 comments

Comments

@xiaogege1210
Copy link

Why do I get an error when using ceDice as the loss function during training: ../aten/src/ATen/native/cuda/NLLLoss2d.cu:104: nll_loss2d_forward_kernel: block: [0,0,0], thread: [278,0,0] Assertion 't >= 0 && t < n_classes' failed., but when I switch to nDiceLoss, it runs normally? Why is that?

@JCruan519
Copy link
Owner

JCruan519 commented Oct 22, 2024 via email

@xiaogege1210
Copy link
Author

I am using the Synapse dataset you provided, with num_classes=9, and the model outputs logits with a shape of (B, 9, 224, 224). Do you know what might be causing the error?

@JCruan519
Copy link
Owner

You can first check whether the conda environment is configured according to the contents of the requirements.
As for this particular error, the cause is that the number of predicted categories is more than the number of labels.

@xiaogege1210
Copy link
Author

Sure, thank you very much for your help.

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