注意力机制
从 Encoder-Decoder Attention 到 Self-Attention 与 Multi-Head Attention 的可视化。
编码器—解码器注意力
自注意力(Self-Attention)
多头注意力(Multi-Head Attention)
图片来源:Jay Alammar — The Illustrated Transformer
从 Encoder-Decoder Attention 到 Self-Attention 与 Multi-Head Attention 的可视化。
图片来源:Jay Alammar — The Illustrated Transformer