View source on GitHub |
Computes the Dice loss value between y_true
and y_pred
.
tf.keras.losses.dice(
y_true, y_pred
)
Formula:
loss = 1 - (2 * sum(y_true * y_pred)) / (sum(y_true) + sum(y_pred))
Args | |
---|---|
y_true
|
tensor of true targets. |
y_pred
|
tensor of predicted targets. |
Returns | |
---|---|
Dice loss value. |