tf.keras.losses.Dice

Computes the Dice loss value between y_true and y_pred.

Inherits From: Loss

Formula:

loss = 1 - (2 * sum(y_true * y_pred)) / (sum(y_true) + sum(y_pred))

y_true tensor of true targets.
y_pred tensor of predicted targets.

Dice loss value.

Methods

call

View source

from_config

View source

get_config

View source

__call__

View source

Call self as a function.