未验证 提交 2e41b5de 编写于 作者: C cuicheng01 提交者: GitHub

Update celoss.py

上级 e5771019
...@@ -51,7 +51,6 @@ class CELoss(nn.Layer): ...@@ -51,7 +51,6 @@ class CELoss(nn.Layer):
loss = paddle.sum(x * label, axis=-1) loss = paddle.sum(x * label, axis=-1)
else: else:
if label.shape[-1] == x.shape[-1]: if label.shape[-1] == x.shape[-1]:
label = F.softmax(label, axis=-1)
soft_label = True soft_label = True
else: else:
soft_label = False soft_label = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册