transformer 学习

transformer 学习_第1张图片

 原理学习:

(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 

你可能感兴趣的:(transformer,学习,深度学习)