Skip to content

Added focal_loss_with_probs and full activation selection in Dice+FL. #8493

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

j-morano
Copy link

@j-morano j-morano commented Jun 20, 2025

Fixes #8242

Description

Added option to compute Focal Loss (FL) directly from class probabilities instead of logits.
Added parameters to the different loss classes combining Dice and FL to allow choosing the activation function (if any) for FL.
Added corresponding tests passing with pytest tests/losses/ -v.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@j-morano j-morano marked this pull request as draft June 20, 2025 17:53
@j-morano j-morano force-pushed the probability-focal-loss branch from 280963a to dd888de Compare June 20, 2025 18:43
@j-morano j-morano marked this pull request as ready for review June 20, 2025 21:41
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.

DiceFocalLoss does not have the option to run softmax focal loss
1 participant