Skip to content
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

Enable SparseCategoricalCrossentropy to accept and propagate axis #21104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

edge7
Copy link
Contributor

@edge7 edge7 commented Mar 28, 2025

No description provided.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…is; minor PyTorch implementation update to support channel-first layouts
@edge7
Copy link
Contributor Author

edge7 commented Mar 28, 2025

This is mainly to accommodate issue #21097
By the way, it does not completely fix it, as I have not modified the squeeze part, which means the target still needs to be something like (BATCH_SIZE, N, W) and not (BATCH_SIZE, 1, N, W)

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.69%. Comparing base (e1c59ff) to head (bec7485).

Files with missing lines Patch % Lines
keras/src/backend/torch/nn.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21104   +/-   ##
=======================================
  Coverage   82.68%   82.69%           
=======================================
  Files         564      564           
  Lines       54128    54130    +2     
  Branches     8411     8411           
=======================================
+ Hits        44758    44764    +6     
+ Misses       7295     7293    -2     
+ Partials     2075     2073    -2     
Flag Coverage Δ
keras 82.50% <66.66%> (+<0.01%) ⬆️
keras-jax 64.03% <0.00%> (+<0.01%) ⬆️
keras-numpy 59.10% <0.00%> (+<0.01%) ⬆️
keras-openvino 32.88% <0.00%> (-0.01%) ⬇️
keras-tensorflow 64.35% <0.00%> (+<0.01%) ⬆️
keras-torch 64.08% <66.66%> (+<0.01%) ⬆️

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.

Copy link
Collaborator

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to pull Ready to be merged into the codebase size:L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants