-
Notifications
You must be signed in to change notification settings - Fork 614
Added support for arbitrary tensors for FRN. #1496
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
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
You are owner of some files modified in this pull request. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Opletts Thanks for the PR, a few suggested changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Opletts The changes look good, can you add the test cases?
@Squadrick Modified the test cases, limited the tensor sizes to 7 because my system ran out of memory, shouldn't be an issue though. |
@Squadrick @AakashKumarNain just went through the paper again and it doesn't make sense for 2D tensors. FRN is a global normalisation over the spatial extent and that it's done on a per channel basis.
Is my understanding completely flawed? Was I doing the right thing earlier? |
@Opletts You're right. We assume that the 0th index is batch, so we need 3D at least. |
* Tests for 3D-7D tensors * Error raised when tensors aren't at least 3D
@Squadrick @AakashKumarNain let me know if everything looks alright, I'll make changes if required. |
Thank you for your contribution. We sincerely apologize for any delay in reviewing, but TensorFlow Addons is transitioning to a minimal maintenance and release mode. New features will not be added to this repository. For more information, please see our public messaging on this decision: Please consider sending feature requests / contributions to other repositories in the TF community with a similar charters to TFA: |
I'll write the test cases, just wanted to confirm if my changes are correct.
@Squadrick @saurabhme
In case of FC Layers with dimensions of B x N, we normalize across N. What's the shape of
self.gamma
andself.beta
supposed to be? I've used 1 x N for now, let me know if I've misunderstood something.