!1469 fix issue SmoothL1Loss grad wrt target

Merge pull request !1469 from zhaozhenlong/fix-issue-smooth-l1-loss-grad-wrt-target
This commit is contained in:
mindspore-ci-bot 2020-05-26 14:18:20 +08:00 committed by Gitee
commit 0aa95098fe
1 changed files with 2 additions and 1 deletions

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