mirror of
https://github.com/skindhu/Build-A-Large-Language-Model-CN.git
synced 2026-07-15 16:50:11 +08:00
add third chapter
This commit is contained in:
@@ -990,7 +990,7 @@ 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。
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user