API symbolsnn
Copy
tensorplay.nn.functional.huber_loss
- tensorplay.nn.functional.huber_loss(input: TensorBase, target: TensorBase, reduction: str = 'mean', delta: float = 1.0, weight: TensorBase | None = None) TensorBase[source]
Compute the Huber loss, with optional weighting.
Function uses a squared term if the absolute error falls below delta and a delta-scaled L1 term otherwise. See
HuberLossfor details.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?
