未验证 提交 422dd57c 编写于 作者: L littletomatodonkey 提交者: GitHub

fix ce loss with label smooth (#838)

上级 f9e51081
......@@ -48,4 +48,5 @@ class CELoss(nn.Layer):
else:
soft_label = False
loss = F.cross_entropy(x, label=label, soft_label=soft_label)
loss = loss.mean()
return {"CELoss": loss}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册