From bcd2f1251eccdb6d3528ce33f40fe1654c652c3f Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 9 Dec 2022 19:41:32 +0000 Subject: [PATCH] LossDice: Do 1 - thing instead of -thing --- aimodel/src/lib/ai/components/LossDice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aimodel/src/lib/ai/components/LossDice.py b/aimodel/src/lib/ai/components/LossDice.py index c2f6cc8..5abecd5 100644 --- a/aimodel/src/lib/ai/components/LossDice.py +++ b/aimodel/src/lib/ai/components/LossDice.py @@ -29,7 +29,7 @@ def dice_coef_loss(y_true, y_pred, **kwargs): Returns: Tensor: The Dice coefficient, but as a loss value that decreases instead fo increases as the model learns. """ - return -dice_coef(y_true, y_pred, **kwargs) + return 1 - dice_coef(y_true, y_pred, **kwargs)