From 46d1db3115e6abbee07f359151cd6f3937a7e8ee Mon Sep 17 00:00:00 2001 From: milesial Date: Sun, 28 Oct 2018 14:54:14 +0100 Subject: [PATCH] Another error in diceloss Former-commit-id: 24a26eaa42b2a8e24335a421047af37cd11adb85 --- dice_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dice_loss.py b/dice_loss.py index 631638f..71edf6a 100644 --- a/dice_loss.py +++ b/dice_loss.py @@ -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