LossDice: Do 1 - thing instead of -thing

This commit is contained in:
Starbeamrainbowlabs 2022-12-09 19:41:32 +00:00
parent d0dbc50bb7
commit bcd2f1251e
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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)