pytorch / 2 / generated / torch.nn.functional.huber_loss.html

torch.nn.functional.huber_loss

torch.nn.functional.huber_loss(input, target, reduction='mean', delta=1.0) [source]

Function that uses a squared term if the absolute element-wise error falls below delta and a delta-scaled L1 term otherwise.

See HuberLoss for details.

Return type

Tensor

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.nn.functional.huber_loss.html