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