|  View source on GitHub | 
Computes the Dice loss value between y_true and y_pred.
Inherits From: Loss
tf.keras.losses.Dice(
    reduction='sum_over_batch_size', name='dice'
)
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. | 
Methods
call
call(
    y_true, y_pred
)
from_config
@classmethodfrom_config( config )
get_config
get_config()
__call__
__call__(
    y_true, y_pred, sample_weight=None
)
Call self as a function.