RNN 从左到右逐个读取。注意看 Memory(记忆),随着句子变长,最早的信息("The")可能会被后面的信息冲淡,这就是“长距离依赖”问题。
Current Focus: "{{ transformerWords[hoveredWordIndex] }}"
Paying attention to: "{{ transformerWords[attn.idx] }}" ({{ Math.round(attn.score * 100) }}%)
👆 鼠标悬停在任意单词上,查看它在“关注”谁。
Transformer 一眼看完整个句子(并行)。Self-Attention
机制让每个词都能直接“看见”其他词,无论距离多远。
例如:悬停在 "it" 上,你会发现它强烈关注
"animal",因为它指代的就是 animal。