
原理学习:
(3条消息) The Illustrated Transformer【译】_于建民的博客-CSDN博客
代码学习:
https://github.com/jadore801120/attention-is-all-you-need-pytorch/tree/master/transformer
mask学习:
(3条消息) NLP 中的Mask全解_mask在自然语言处理代表什么_郝伟博士的博客-CSDN博客
多头注意力机制学习:
【1】代码:
class MultiHeadAttention(nn.Module):
''' Multi-Head Attention module '''
def __init__(self, n_head, d_model, d_k, d_v, dropout=0.1):
super().__init__()
self.n_head = n_head
self.d_k

















![Maven详见及在Idea中的使用方法[保姆级包学包会]](https://img-blog.csdnimg.cn/66e7a6798f244818821c0c358fe8cf83.png)

