提交 3ca813e6 编写于 作者: H HydrogenSulfate 提交者: chajchaj

Update loss.py

上级 b9f665d8
......@@ -1801,7 +1801,7 @@ def cross_entropy(input,
weight_gather_reshape = reshape(weight_gather, shape=out_shape)
out = paddle.cast(out, weight_gather_reshape.dtype)
else:
if input.shape[-1] != weight.shape[-1]:
if input.shape[-1] != weight.shape[-1]:
raise ValueError("input's class_dimension({}) must equal to "\
"weight's class_dimension({}) "\
"when weight is provided"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册