Spec-Zone.ru › TensorFlow

tf.keras.losses.Dice

Вычисляет значение потери Dice между y_true и y_pred.

Наследуется от: Loss

tf.keras.losses.Dice(
    reduction='sum_over_batch_size', name='dice'
)

Формула:

loss = 1 - (2 * sum(y_true * y_pred)) / (sum(y_true) + sum(y_pred))
Аргументы
y_true тензор истинных целевых значений.
y_pred тензор предсказанных целевых значений.
Возвращает
Значение потери Dice.

Методы

call

Просмотреть исходный код

call(
    y_true, y_pred
)

from_config

Просмотреть исходный код

@classmethod
from_config(
    config
)

get_config

Просмотреть исходный код

get_config()

__call__

Просмотреть исходный код

__call__(
    y_true, y_pred, sample_weight=None
)

Вызов self как функции.

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/keras/losses/Dice

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API