tf.nn.l2_loss
Функция потерь L2.
tf.nn.l2_loss(
t: Annotated[Any, TV_L2Loss_T], name=None
) -> Annotated[Any, TV_L2Loss_T]
Вычисляет половину нормы L2 тензора без sqrt:
output = sum(t ** 2) / 2
| Аргументы | |
|---|---|
t | Tensor. Должен быть одного из следующих типов: half, bfloat16, float32, float64. Обычно 2-мерный, но может иметь любые размерности. |
name | Имя операции (необязательно). |
| Возвращает | |
|---|---|
Tensor. Имеет тот же тип, что и t. |
© 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/nn/l2_loss