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

Make UnitNormalization layer stateless. #810

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

copybara-service[bot]
Copy link

Make UnitNormalization layer stateless.

There is no need to resolve negative axes in build, as tf.linalg.l2_normalize can handle them. Kept the build method to validate the axes in the context of the input_shape. Also added call to super.build(...) per best practice on Keras 2.

Note that in Keras 3, UnitNormalization is already stateless.

There is no need to resolve negative axes in `build`, as `tf.linalg.l2_normalize` can handle them. Kept the build method to validate the axes in the context of the `input_shape`. Also added call to `super.build(...)` per best practice on Keras 2.

Note that in Keras 3, `UnitNormalization` is already stateless.

PiperOrigin-RevId: 699285760
@copybara-service copybara-service bot merged commit 916ca64 into master Nov 22, 2024
@copybara-service copybara-service bot deleted the test_699253410 branch November 22, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants