mirror of
https://github.com/skindhu/Build-A-Large-Language-Model-CN.git
synced 2026-07-26 13:50:24 +08:00
add third chapter
This commit is contained in:
@@ -990,7 +990,7 @@ tensor([[2., 2., 0., 2., 2., 0.],
|
|||||||
>
|
>
|
||||||
> Softmax 函数的公式如下:
|
> 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。
|
> 其中z<sub>i</sub>是输入的每个分数(即未激活的原始值),e 是自然对数的底。这个公式的作用是将输入向量中的每个元素转换为一个概率值,且所有值的和为 1。
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user