提交 b9f665d8 编写于 作者: H HydrogenSulfate 提交者: chajchaj

Update loss.py

上级 de972c50
......@@ -1650,7 +1650,7 @@ def cross_entropy(input,
if input_dims - 1 == label_dims:
label = paddle.unsqueeze(label, axis=axis)
if in_dygraph_mode():
if soft_label == False:
if soft_label == False:
valid_label = paddle.where(
label == ignore_index,
paddle.zeros_like(label),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册