Skip to content

Instantly share code, notes, and snippets.

View danielwatson6's full-sized avatar
💭
GitLab: danielwatson6

Daniel Watson danielwatson6

💭
GitLab: danielwatson6
View GitHub Profile
@tokestermw
tokestermw / self_attention.py
Last active June 29, 2022 05:39
Implementation of self-attention in the paper "Attention Is All You Need" in TensorFlow.
"""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