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 squeeze in tf2jax for empty tuple axis arguments. #150

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

copybara-service[bot]
Copy link

Fix squeeze in tf2jax for empty tuple axis arguments.

tf.squeeze and jnp.squeeze have different behavior when axis=(). TF will squeeze all axes, and jnp will squeeze no axes. This change will set axis=None when an empty tuple is passed into jnp.squeeze to ensure that the behavior matches that of TF.

@google-cla
Copy link

google-cla bot commented Aug 9, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service copybara-service bot force-pushed the test_555249518 branch 2 times, most recently from 7d1d9ad to 3e4bb64 Compare August 9, 2023 23:54
tf.squeeze and jnp.squeeze have different behavior when axis=(). TF will squeeze all axes, and jnp will squeeze no axes. This change will set axis=None when an empty tuple is passed into jnp.squeeze to ensure that the behavior matches that of TF.

PiperOrigin-RevId: 555319093
@copybara-service copybara-service bot merged commit 1a7a628 into main Aug 10, 2023
@copybara-service copybara-service bot deleted the test_555249518 branch August 10, 2023 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants