PR #17651: Add CategoricalFocalCrossentropy to Losses API #17736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #17651: Add CategoricalFocalCrossentropy to Losses API
Imported from GitHub PR #17651
Implements the
CategoricalFocalCrossentropy()
loss based on the paper Focal Loss for Dense Object Detection (Lin et al., 2018).Feature request was made in keras-team/tf-keras#259.
Copybara import of the project:
--
5696b5a by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Add pure logic of CFCE
--
40e547f by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Add support for ragged tensors
--
d3dd32f by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Make sure output sum equals 1
--
16adf85 by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Raise shape mismatch / update tests
--
bc38e33 by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Add categorical_focal_loss tests
--
363baaf by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Add documentation / minor fix.
--
c267fa0 by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Reformatting after focal loss implementation
--
3c33117 by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Fix linting.
--
3538622 by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Fix docstring style.
--
6b4fa6b by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Update the docstrings.
--
49c03a2 by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Fix linting issues
--
f560336 by Kaan Bıçakcı kaan.dvlpr@gmail.com:
Address comments from code-review.
Merging this change closes #17651
FUTURE_COPYBARA_INTEGRATE_REVIEW=#17651 from Frightera:frightera_categorical_focal_loss_v2 f560336