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
Add axis parameter to dice loss #19673
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Hi @td-jakubl Can you please sign CLA. Thank you! |
Done :) |
Hi @gbaned some test fails and perhaps this is not related to changes in this PR. Do you have any idea why? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Please add a unit test.
keras/src/losses/losses.py
Outdated
|
||
Examples: | ||
|
||
y_true = tf.constant([[[[1.0], [1.0]], [[0.0], [0.0]]], [[[1.0], [1.0]], [[0.0], [0.0]]]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a code block for the code example. Do not use TF APIs, only Keras APIs (backend agnostic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the contribution!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #19673 +/- ##
===========================================
- Coverage 81.47% 66.69% -14.79%
===========================================
Files 498 498
Lines 45773 45757 -16
Branches 8458 8454 -4
===========================================
- Hits 37294 30517 -6777
- Misses 6577 13595 +7018
+ Partials 1902 1645 -257
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
No, problem. I reformated code. Could you rerun workflows? |
#19637