Another error in diceloss

Former-commit-id: 24a26eaa42b2a8e24335a421047af37cd11adb85
This commit is contained in:
milesial 2018-10-28 14:54:14 +01:00 committed by GitHub
parent 7e5a8727de
commit 46d1db3115

View file

@ -21,7 +21,7 @@ class DiceCoeff(Function):
if self.needs_input_grad[0]:
grad_input = grad_output * 2 * (target * self.union - self.inter) \
/ self.union * self.union
/ (self.union * self.union)
if self.needs_input_grad[1]:
grad_target = None