- class brainpy.losses.huber_loss(predicts, targets, delta=1.0)#
Huber loss is similar to L2 loss close to zero, L1 loss away from zero. If gradient descent is applied to the huber loss, it is equivalent to clipping gradients of an l2_loss to [-delta, delta] in the backward pass.
predicts (ArrayType) – predictions
targets (ArrayType) – ground truth
delta (float) – radius of quadratic behavior
loss – The loss value.
- Return type: