Skip to content

Instantly share code, notes, and snippets.

@Sakusakumura
Created July 4, 2023 14:25
Show Gist options
  • Save Sakusakumura/8997b04952637fd57de7fa7b6fe719a4 to your computer and use it in GitHub Desktop.
Save Sakusakumura/8997b04952637fd57de7fa7b6fe719a4 to your computer and use it in GitHub Desktop.
旧来のアテンション手法とTransformerで提案された手法の違い
系列の符号化・複合化 系列間での関係学習
seq2seq with attention(従来手法) LSTMのセル間遷移:
ローカルな各フレーム間での変換
(相互)シングルアテンション
→次の予想単語と入力系列の全単語のコンテキストを使用
ConvSeq2seq(従来手法) 系列方向の1D畳み込み層
ローカルな窓内での畳み込み遷移
上に同じ
Transformer マルチヘッド自己アテンション
系列全体の各トークン表現ベクトルを一気に変換+トークンごとにFFNで変換
マルチヘッド相互アテンション
→Encoder-Decoder間もマルチヘッド化し、入力系列全体の各トークンを一気に変換
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment