未验证 提交 414ca6b9 编写于 作者: U ucsk 提交者: GitHub

Fix throw exception typo in paddle/nn/functional/loss.py (#39750)

上级 ba1dce0a
......@@ -390,8 +390,8 @@ def _c_softmax_with_cross_entropy(
label_dims = len(list(label.shape))
if input_dims - 1 != label_dims and input_dims != label_dims:
raise ValueError(
'Expected nput_dims - 1 = label_dims or input_dims == label_dims\
(got nput_dims{}, label_dims{})'.format(
'Expected input_dims - 1 = label_dims or input_dims == label_dims\
(got input_dims{}, label_dims{})'.format(
input_dims, label_dims
)
)
......
......@@ -2113,7 +2113,7 @@ def margin_cross_entropy(
if input_dims - 1 != label_dims and input_dims != label_dims:
raise ValueError(
'Expected input_dims - 1 = label_dims or input_dims == label_dims\
(got nput_dims{}, label_dims{})'.format(
(got input_dims{}, label_dims{})'.format(
input_dims, label_dims
)
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册