-
Notifications
You must be signed in to change notification settings - Fork 648
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
Add GroupNorm to NNX normalization layers #4095
Conversation
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. |
Thanks @cgarciae ! I have added an entry for GroupNorm and also fixed the mypy error. |
@treigerm can you squash your commits? |
@cgarciae done! |
Had to apply the fix from #4098 to make mypy tests pass locally now. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4095 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 106 109 +3
Lines 13582 14261 +679
======================================
- Misses 13582 14261 +679 ☔ View full report in Codecov by Sentry. |
What does this PR do?
Addresses #4086 and adds a GroupNorm layer to NNX. I tried to follow the Linen implementation and how the other layers have been ported. I also tested equivalence checks between Linen's GroupNorm implementation and the NNX implementation.
Some notes:
num_features
instead ofnum_channels
as an input argument to stay consistent with the LayerNorm implementation.reduced_feature_shape
list in the_normalize
function as it is unused. If there is a reason why the list was created without being used I can reverse the deletion.Checklist
checks if that's the case).
documentation guidelines.
(No quality testing = no merge!)