tf.keras.losses.MeanSquaredError
Вычисляет среднее значение квадратов ошибок между метками и прогнозами.
Наследуется от: Loss
tf.keras.losses.MeanSquaredError(
reduction='sum_over_batch_size',
name='mean_squared_error'
)
Используется в ноутбуках
| Используется в учебниках |
|---|
Формула:
loss = mean(square(y_true - y_pred))
| Аргументы | |
|---|---|
reduction | Тип редукции, применяемой к потере. В почти всех случаях это должно быть "sum_over_batch_size". Доступные варианты: "sum", "sum_over_batch_size" или None. |
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/MeanSquaredError