Skip to content

Commit beb52aa

Browse files
authored
Update optimization_tutorial.md
normalize the logits 是归一化 logtis 而不是正则化
1 parent 5e5e28a commit beb52aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/2.0/tutorials/beginner/basics/optimization_tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ epochs = 5
141141

142142
常见的损失函数包括给回归任务用的 `nn.MSELoss`(Mean Square Error, 均方误差)、给分类任务使用的 `nn.NLLLoss`(Negative Log Likelihood, 负对数似然)、`nn.CrossEntropyLoss`(交叉熵损失函数)结合了 `nn.LogSoftmax``nn.NLLLoss`.
143143

144-
我们把模型输出的 logits 传递给 `nn.CrossEntropyLoss`它会正则化 logits 并计算预测误差。
144+
我们把模型输出的 logits 传递给 `nn.CrossEntropyLoss`它会归一化 logits 并计算预测误差。
145145

146146
```py
147147
# 初始化损失函数

0 commit comments

Comments
 (0)