tf.keras.losses.LogCosh
Вычисляет логарифм гиперболического косинуса ошибки предсказания.
Наследуется от: Loss
tf.keras.losses.LogCosh(
reduction='sum_over_batch_size', name='log_cosh'
)
Формула:
error = y_pred - y_true logcosh = mean(log((exp(error) + exp(-error))/2), axis=-1)`
где x — ошибка y_pred - y_true.
| Аргументы | |
|---|---|
reduction | Тип редукции, применяемой к потере. Доступные варианты: "sum", "sum_over_batch_size" или None. По умолчанию "sum_over_batch_size". |
name | Необязательное имя экземпляра. |
Методы
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/LogCosh