Attention 网络层学习总结
2020-03-26 本文已影响0人
半大人
目录:
一 :必读的博客与论文
二 :keras attention项目
三 :对Attention的一些个人理解
一:必读的博客与论文
1 Google 的论文:《Attention is all you need》
2 《attention is all you need》解读
3 《Attention is All You Need》浅读(简介+代码)(苏剑林大佬写的)
4 Transformer(一) -- 论文解读
5 Attention原理及TensorFlow AttentionWrapper源码解析(崔庆才大佬写的)
二 :keras attention项目
keras 是我最喜欢的深度学习库,没有之一,我在网上搜了好久,终于,找到了一个由苏剑林大佬维护的github项目bert4keras,里面有keras实现的PositionEmbedding, MultiHeadAttention 网络网络层,点击直达.
三:对Attention的一些个人理解
attention的定义:

下面是他的模型图:

还有另一个重要结构MultiHead
他的公式:
MultiHead(Q,K,V)=Concat(head(1),...,head(h))
结构图:
