Skip to content

Conversation

@samitshah1
Copy link
Contributor

What's the update?

  • Updated example in docstring for Categorical Focal Crossentropy Loss
  • Fixed typos in docstring for Binary Focal Crossentropy Loss

Why was the update required?

  • While reading the documentation for Categorical Focal Crossentropy Loss, the example imo seems to lack clarity on how the resultant loss translates to an increased focus on harder examples, compared to Categorical Crossentropy Loss.

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.47%. Comparing base (6e688ab) to head (fa89ab0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21044   +/-   ##
=======================================
  Coverage   82.47%   82.47%           
=======================================
  Files         563      563           
  Lines       53834    53834           
  Branches     8359     8359           
=======================================
  Hits        44401    44401           
  Misses       7392     7392           
  Partials     2041     2041           
Flag Coverage Δ
keras 82.29% <ø> (ø)
keras-jax 63.79% <ø> (ø)
keras-numpy 58.75% <ø> (ø)
keras-openvino 32.71% <ø> (ø)
keras-tensorflow 64.11% <ø> (ø)
keras-torch 63.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gbaned gbaned added this to PR Queue Mar 17, 2025
@github-project-automation github-project-automation bot moved this to Assigned Reviewer in PR Queue Mar 17, 2025
@gbaned gbaned requested a review from fchollet March 17, 2025 05:49
array([0.330, 0.206], dtype=float32)
>>> # Compare with binary_crossentropy
>>> bce_loss = keras.losses.binary_focal_crossentropy(
>>> bce_loss = keras.losses.binary_crossentropy(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is showing an example of the wrong function.

@github-actions
Copy link

This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Aug 23, 2025
@github-actions
Copy link

github-actions bot commented Sep 7, 2025

This PR was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

@github-actions github-actions bot closed this Sep 7, 2025
@github-project-automation github-project-automation bot moved this from Assigned Reviewer to Closed/Rejected in PR Queue Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Closed/Rejected

Development

Successfully merging this pull request may close these issues.

4 participants