forked from mindspore-Ecosystem/mindspore
!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:
commit
0aa95098fe
|
@ -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…
Reference in New Issue