Skip to content

Add ignore_index to Jaccard loss #1151

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

simonreise
Copy link
Contributor

All the other segmentation losses have ignore_index parameter, and JaccardLoss does not. The ignore_index logic was copied from Dice Loss

Copy link
Collaborator

@qubvel qubvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@qubvel qubvel merged commit 05db6b5 into qubvel-org:main Jun 4, 2025
16 checks passed
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
segmentation_models_pytorch/losses/jaccard.py 37.50% 10 Missing ⚠️
Files with missing lines Coverage Δ
segmentation_models_pytorch/losses/jaccard.py 73.01% <37.50%> (-12.70%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@simonreise simonreise deleted the ignore-index-jaccard-loss branch June 4, 2025 11:58
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 this pull request may close these issues.

2 participants