Browse Source

!1469 fix issue SmoothL1Loss grad wrt target

Merge pull request !1469 from zhaozhenlong/fix-issue-smooth-l1-loss-grad-wrt-target
tags/v0.5.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
0aa95098fe
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/ops/_grad/grad_nn_ops.py

+ 2
- 1
mindspore/ops/_grad/grad_nn_ops.py View File

@@ -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



Loading…
Cancel
Save