未验证 提交 0673a54f 编写于 作者: Y YuhangLi 提交者: GitHub

fix softmax_cross_entropy return val (#50218)

上级 32e977c5
...@@ -2601,7 +2601,7 @@ def cross_entropy( ...@@ -2601,7 +2601,7 @@ def cross_entropy(
"npu" "npu"
) or core.is_compiled_with_custom_device("mlu"): ) or core.is_compiled_with_custom_device("mlu"):
if not soft_label: if not soft_label:
_, _, out = _legacy_C_ops.softmax_with_cross_entropy( _, out = _legacy_C_ops.softmax_with_cross_entropy(
input, input,
valid_label, valid_label,
'soft_label', 'soft_label',
...@@ -2616,7 +2616,7 @@ def cross_entropy( ...@@ -2616,7 +2616,7 @@ def cross_entropy(
use_softmax, use_softmax,
) )
else: else:
_, _, out = _legacy_C_ops.softmax_with_cross_entropy( _, out = _legacy_C_ops.softmax_with_cross_entropy(
input, input,
label, label,
'soft_label', 'soft_label',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册