Another error in diceloss
Former-commit-id: 24a26eaa42b2a8e24335a421047af37cd11adb85
This commit is contained in:
parent
7e5a8727de
commit
46d1db3115
|
@ -21,7 +21,7 @@ class DiceCoeff(Function):
|
||||||
|
|
||||||
if self.needs_input_grad[0]:
|
if self.needs_input_grad[0]:
|
||||||
grad_input = grad_output * 2 * (target * self.union - self.inter) \
|
grad_input = grad_output * 2 * (target * self.union - self.inter) \
|
||||||
/ self.union * self.union
|
/ (self.union * self.union)
|
||||||
if self.needs_input_grad[1]:
|
if self.needs_input_grad[1]:
|
||||||
grad_target = None
|
grad_target = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue