Attention 待更新

 

Attention

注意力机制可以描述为一个函数,这个函数将query和一组key-value对映射成一个输出。

Scaled Dot-Porduct Attention

Paste_Image.png

代码可以参考大神的这两个repo:

(1)https://github.com/CyberZHG/keras-self-attention

(2)https://github.com/CyberZHG/keras-multi-head

发布了342 篇原创文章 · 获赞 794 · 访问量 178万+

猜你喜欢

转载自blog.csdn.net/u014365862/article/details/104500197