-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Make take_along_axis
with TF backend compilable.
#21239
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When there are dynamic dimensions, like typically the batch size, `tf.broadcast_dynamic_shape` is not always compilable. Replace with an adhoc implementation for dynamic dimensions where we rely on the broadcast itself to fail when the shapes are not broadcastable. Tested with https://github.com/keras-team/keras-rs/blob/main/examples/listwise_ranking.py on GPU as I was not able to distill a simple reproduction of this.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21239 +/- ##
==========================================
- Coverage 82.60% 82.59% -0.01%
==========================================
Files 564 564
Lines 54501 54509 +8
Branches 8469 8471 +2
==========================================
+ Hits 45020 45024 +4
- Misses 7397 7399 +2
- Partials 2084 2086 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fchollet
approved these changes
May 4, 2025
hertschuh
added a commit
to hertschuh/keras
that referenced
this pull request
May 7, 2025
Change keras-team#21239 broke one use case when the axis dimension is dynamic, the type of the indices is not int32, and the op is run in graph mode. Note that the additional unit tests don't actually cover this.
fchollet
pushed a commit
that referenced
this pull request
May 7, 2025
Change #21239 broke one use case when the axis dimension is dynamic, the type of the indices is not int32, and the op is run in graph mode. Note that the additional unit tests don't actually cover this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When there are dynamic dimensions, like typically the batch size,
tf.broadcast_dynamic_shape
is not always compilable.Replace with an adhoc implementation for dynamic dimensions where we rely on the broadcast itself to fail when the shapes are not broadcastable.
Tested with https://github.com/keras-team/keras-rs/blob/main/examples/listwise_ranking.py on GPU as I was not able to distill a simple reproduction of this.