声明:仅学习使用~
目录
一、介绍
1.1 Attention,Self-Attention
核心,可以说是 三层全连接,再加一个 softmax。
Attention
的结构,可以说是全连接层
,即 Fully connected layer
。
三个向量 q、k、v
,通过调用函数来实现 传入输入维度,给出输出维度 这种效果。
由三个全连接层组成。这也是Attention的设计结构, q k v 可以理解为 都是作为输入,三者 输入 分别进入三个全连接层,同时 这三个全连接层是并列
的。
- Linear layer to transform the query (decoder hidden state):直译过来的意思 线性层转换查询(解码器隐藏状态)。
- Linear layer to transform the key (encoder hidden state):线性层转换密钥(编码器隐藏状态)。
- Linear layer to transform the value (encoder hidden state):线性层对数值进行转换(编码器隐藏状态)