Skip to content

Implement cbrt function in keras.ops #21453

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

Merged
merged 3 commits into from
Jul 7, 2025
Merged

Conversation

shashaka
Copy link
Contributor

@shashaka shashaka commented Jul 4, 2025

Adds keras.ops.cbrt, which computes the real-valued cube root of each element in the input tensor.
Supported across NumPy, TensorFlow, PyTorch, and JAX backends. Not supported on OpenVINO.

@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2025

Codecov Report

Attention: Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 82.75%. Comparing base (18ab462) to head (c2e30f8).

Files with missing lines Patch % Lines
keras/api/_tf_keras/keras/ops/__init__.py 0.00% 1 Missing ⚠️
keras/api/_tf_keras/keras/ops/numpy/__init__.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21453   +/-   ##
=======================================
  Coverage   82.74%   82.75%           
=======================================
  Files         565      565           
  Lines       55300    55340   +40     
  Branches     8624     8631    +7     
=======================================
+ Hits        45756    45794   +38     
- Misses       7439     7441    +2     
  Partials     2105     2105           
Flag Coverage Δ
keras 82.56% <95.00%> (+<0.01%) ⬆️
keras-jax 63.32% <37.50%> (-0.02%) ⬇️
keras-numpy 58.53% <52.50%> (-0.01%) ⬇️
keras-openvino 33.77% <22.50%> (-0.01%) ⬇️
keras-tensorflow 63.75% <50.00%> (-0.01%) ⬇️
keras-torch 63.36% <50.00%> (-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, thank you for the PR!

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Jul 6, 2025
@fchollet fchollet merged commit 157f653 into keras-team:master Jul 7, 2025
10 checks passed
@shashaka shashaka deleted the cbrt branch July 7, 2025 21:53
Mohamed-Ashraf273 pushed a commit to Mohamed-Ashraf273/keras that referenced this pull request Jul 8, 2025
* Add cbrt implementation for ops

* Add test case for cbrt

* Update excluded_concrete_tests.txt
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:M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants