Skip to content

Typo in comment: segmentation_models_pytorch/losses/dice.py #1169

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

Closed
ariessunfeld opened this issue Jun 1, 2025 · 4 comments · Fixed by #1181
Closed

Typo in comment: segmentation_models_pytorch/losses/dice.py #1169

ariessunfeld opened this issue Jun 1, 2025 · 4 comments · Fixed by #1181

Comments

@ariessunfeld
Copy link

In dice.py, inside the forward method, a comment says: # Dice loss is undefined for non-empty classes.
However, I'm under the impression that this should instead say # Dice loss is undefined for empty classes.

@qubvel
Copy link
Collaborator

qubvel commented Jun 4, 2025

Yeah, maybe even better: for empty images with no classes

@qubvel
Copy link
Collaborator

qubvel commented Jun 4, 2025

Thanks for noticing, would you like to make a PR?

@snehilsanyal
Copy link
Contributor

Hey @qubvel , currently I am using the library for my PhD, and stumbled upon this typo. Can I take this up, if it's not taken yet?

@qubvel
Copy link
Collaborator

qubvel commented Jun 16, 2025

Hi @snehilsanyal, sure, I would appreciate this! Thanks

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

Successfully merging a pull request may close this issue.

3 participants