add third chapter

This commit is contained in:
skindhu 2024-11-02 15:01:43 +08:00
parent 57e738f847
commit 34aafd088c
1 changed files with 5 additions and 1 deletions

View File

@ -1000,8 +1000,12 @@ tensor([[2., 2., 0., 2., 2., 0.],
> >
> >
> >
> Softmax 函数的公式如下:
>
> $$ \text{softmax}\left(z_{i}\right)=\frac{e^{z_{i}}}{\sum_{j} e^{z_{j}}} $$ > $$ \text{softmax}\left(z_{i}\right)=\frac{e^{z_{i}}}{\sum_{j} e^{z_{j}}} $$
> >
> 其中z<sub>i</sub>是输入的每个分数即未激活的原始值e 是自然对数的底。这个公式的作用是将输入向量中的每个元素转换为一个概率值,且所有值的和为 1。
>
> >
现在,让我们将 dropout 应用于注意力权重矩阵本身: 现在,让我们将 dropout 应用于注意力权重矩阵本身: