其他分享
首页 > 其他分享> > 7_Attention(注意力机制)

7_Attention(注意力机制)

作者:互联网

文章目录

一、Seq2Seq Model

Shortcoming: The final state is incapable of remembering a long sequence.

image-20210402152530449

二、Seq2Seq Model with Attention

2.1 SimpleRNN + Attention

在Encoder结束工作之后,Decoder 和Attention同时开始工作。QQ截图20210402153630

image-20210402170233688

2.1.1 权重计算αi

方法一: (used in the original paper):在原始论文中使用

image-20210402172113779

方法二:(more popular; the same to Transformer)

image-20210402172842453

2.1.2 Context vector Ci

image-20210402173439556

image-20210402175754801

2.2 Time Complexity(时间复杂度)

问题:How many weights ai have been computed? (我们共计算了多少权重ai

image-20210402204443690

三、Summary(总结)

标签:状态,attention,Attention,Seq2Seq,encoder,decoder,机制,注意力
来源: https://blog.csdn.net/brawly/article/details/122710717