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

Fix ops.shape() for tf.RaggedTensor. #19707

Merged
merged 1 commit into from
May 11, 2024

Conversation

hertschuh
Copy link
Contributor

With the TensorFlow backend, when passing a RaggedTensor, the dynamic shape returned by tf.shape is an object that raises an exception when a ragged dimension is accessed. We catch it and leave the dimension as None.

With the TensorFlow backend, when passing a `RaggedTensor`, the dynamic shape returned by `tf.shape` is an object that raises an exception when a ragged dimension is accessed. We catch it and leave the dimension as `None`.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.82%. Comparing base (8bd4cc0) to head (45c1035).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19707      +/-   ##
==========================================
- Coverage   78.52%   68.82%   -9.71%     
==========================================
  Files         498      498              
  Lines       45763    45769       +6     
  Branches     8455     8456       +1     
==========================================
- Hits        35936    31499    -4437     
- Misses       8092    12681    +4589     
+ Partials     1735     1589     -146     
Flag Coverage Δ
keras 68.75% <100.00%> (-9.62%) ⬇️
keras-jax 61.94% <77.77%> (+<0.01%) ⬆️
keras-numpy ?
keras-tensorflow 63.43% <100.00%> (+0.01%) ⬆️
keras-torch ?

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.

Copy link
Member

@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!

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels May 11, 2024
@fchollet fchollet merged commit fe85879 into keras-team:master May 11, 2024
7 checks passed
@google-ml-butler google-ml-butler bot removed ready to pull Ready to be merged into the codebase kokoro:force-run labels May 11, 2024
@hertschuh hertschuh deleted the ragged_shape branch May 13, 2024 01:30
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
PR Queue
Assigned Reviewer
Development

Successfully merging this pull request may close these issues.

None yet

4 participants