mirror of
https://github.com/skindhu/Build-A-Large-Language-Model-CN.git
synced 2026-07-29 07:10:24 +08:00
Update 5.在无标记数据集上进行预训练.md
This commit is contained in:
@@ -328,7 +328,7 @@ neg_avg_log_probas = avg_log_probas * -1
|
||||
print(neg_avg_log_probas)
|
||||
```
|
||||
|
||||
结算的结果为:`tensor(-10.7940)`。
|
||||
结算的结果为:`tensor(10.7940)`。
|
||||
|
||||
这种将负值 -10.7940 转化为正值 10.7940 的操作在深度学习中称为交叉熵损失。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user