diff --git a/mindspore/ops/_grad/grad_nn_ops.py b/mindspore/ops/_grad/grad_nn_ops.py index c557301285cf585a2b9a6dc2c423975232481df2..b5a0fb3bd8cd615ec3ff61742aeda76ee6c5d79a 100755 --- a/mindspore/ops/_grad/grad_nn_ops.py +++ b/mindspore/ops/_grad/grad_nn_ops.py @@ -502,7 +502,8 @@ def get_bprop_smooth_l1_loss(self): def bprop(prediction, target, out, dout): dx = grad(prediction, target, dout) - return dx, zeros_like(target) + dy = grad(target, prediction, dout) + return dx, dy return bprop