-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Positional Encoding Clarification #12
Comments
add sine wave directly to word embedding vector. It is like to attach a name-tag on someone's face..., kind of weird |
This might help you: https://github.com/guillaume-chevalier/Linear-Attention-Recurrent-Neural-Network/blob/master/AnnotatedMultiHeadAttention.ipynb
|
By concatenating, the dimension increases and thus the number of parameters. The addition is similar to response of cells in early visual cortex, like in V1 in the brain. Many cell response to a visual stimuli, say an edge, yet the response of every cell is in addition modulated by eye position (angle of eye direction) and by vergence (~focus distance). |
@srush Thank you so much for this post. However it will be great if you can help me with following clarification regarding Positional Encoding.
The whole intent of using positional encoding is to bring a sense of Positions (absolute or relative) and Time. Using Sine(for even positions) and Cos (for odd positions) wave, how do we embed this?
Also,
Are we saying that since we can transform one function to another (linear transformations) we are keeping track of relative positions for any position with respect to any other position?
The text was updated successfully, but these errors were encountered: