交叉熵Cross-Entropy
Cross-Entropy
衡量预测分布与真实分布差多远,是分类与语言模型最常用的损失。Measure how far the predicted distribution is from the true one; the default loss for classification and language models.
交叉熵等于真实分布的负对数似然:给正确答案的概率越低,惩罚越大。
PyTorch 的 CrossEntropyLoss 把 log-softmax 与负对数似然合在一起。
Cross-entropy is the negative log-likelihood of the true distribution: the lower the probability given to the right answer, the larger the penalty.
PyTorch’s CrossEntropyLoss combines log-softmax and negative log-likelihood.
语言模型的困惑度就是交叉熵的指数形式。看到 loss 数值要先确认单位与词表口径。Perplexity is the exponential of cross-entropy. Before comparing loss numbers, check the unit and the vocabulary denominator.
CE · cross entropy · 负对数似然
回到名词地图看第4段的其他 60 个词 →Back to the map: the other 60 terms in stage 4 →
别停在定义:去任务手册看按什么顺序做、验收什么;或者按你手头的任务,筛 3 个工具候选。Don’t stop at the definition: use the task handbook for the order and checks, or filter three tool candidates for the job at hand.
任务手册 →Task handbooks → · 按任务筛 3 个候选 →Filter three candidates →