标准自注意力(Self-Attention) 和因果注意力(Causal Attention) 的区别
pytorch api文档:nn.Module的register_buffer()方法将张量注册为模型的缓冲区(buffer)
pytorch api文档:nn.ModuleList() 存储多个nn.Module的有序列表容器
pytorch api文档:torch.nn.Module神经网络基类
pytorch api文档:torch.cat()在已有维度上拼接张量(维度数不变)
pytorch api文档:torch.stack()堆叠多个形状相同的张量
pytorch api文档:torch.nn.Dropout
pytorch api文档:张量的.masked_fill()方法-根据布尔类型的张量填充
pytorch api文档:torch.ones_like()复用已有张量的形状、数据类型、设备等属性来创建全1张量
pytorch api文档:torch.ones()创建全1张量