-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 Layer Normalization #2213
Merged
Merged
Add Layer Normalization #2213
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davisking
reviewed
Oct 12, 2020
arrufat
commented
Oct 13, 2020
Ready for review!
|
davisking
reviewed
Oct 17, 2020
davisking
reviewed
Oct 17, 2020
Cool, looks good. Thanks for another PR :) Rename that function you noted and updated the docs and add that one test and this is good to go :) |
arrufat
commented
Oct 19, 2020
arrufat
commented
Oct 20, 2020
arrufat
commented
Oct 20, 2020
Nice, looks good :) |
arrufat
commented
Nov 23, 2020
This was referenced Jan 13, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a second step towards implementing transformers in dlib.
This PR adds Layer Normalization support to dlib.
I have added the CPU implementation and the forward GPU, but I have some doubts, so I would really appreciate if somebody could have a look to the CUDA implementation.
It runs slower than the CPU version and for big inputs (2, 3, 224, 224) results are not good, but for small inputs, it works.
Here's how I tried it, in case anyone wants to try
With a size of (2, 3, 4, 5), I get this:
But with a size of (2, 3, 224, 224):
Thanks in advance for any help