This file contains hidden or 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
"""Example TensorFlow code for Self-Attention mechanism. | |
Refs: | |
Attention Is All You Need | |
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin | |
https://arxiv.org/abs/1706.03762 | |
Transformer: A Novel Neural Network Architecture for Language Understanding | |
https://research.googleblog.com/2017/08/transformer-novel-neural-network.html |