diff --git a/python/paddle/nn/functional/loss.py b/python/paddle/nn/functional/loss.py index fd4e83a6e8700c184bea1d3bbe4d78e8071c90df..bba2f3f469f92368fa593a1825cffbefd9952617 100755 --- a/python/paddle/nn/functional/loss.py +++ b/python/paddle/nn/functional/loss.py @@ -1620,9 +1620,9 @@ def cross_entropy(input, labels = paddle.uniform(shape, dtype='float64', min=0.1, max=1.0) labels /= paddle.sum(labels, axis=axis, keepdim=True) paddle_loss_mean = paddle.nn.functional.cross_entropy( - logits, - labels, - soft_label=True, + logits, + labels, + soft_label=True, axis=axis, weight=weight, reduction=reduction)