Transformer
· ☕ 3 min read
encoder: self-attention → feed-forward NN decoder: self-atteiont → multi-head attention → feed-forward NN self-attention K,V,Qをsource内部で学習 attention K,V,Qをsource-target間で学習 multi-head 各単語ごとにK,V,Qを計算するのではなく, ヘッドの数だけ小さいK,V,Qを計算してconcat. 出力時に重みWをかけて次元を調整 学習対象は各ヘッドの重みW_Q, W_K, W_V と出力W_O attention機構自体には ...