Creates a criterion that uses a squared term if the absolute
element-wise error falls below delta and a delta-scaled L1 term otherwise.
This loss combines advantages of both L1Loss and ; the
delta-scaled L1 region makes the loss less sensitive to outliers than ,
while the L2 region provides smoothness over near 0. See
for more information.
reduction (str, optional) – Specifies the reduction to apply to the output:
'none' | 'mean' | 'sum'. 'none': no reduction will be applied,
'mean': the sum of the output will be divided by the number of
elements in the output, 'sum': the output will be summed. Default: 'mean'
delta (float, optional) – Specifies the threshold at which to change between delta-scaled L1 and L2 loss.
The value must be positive. Default: 1.0
Shape:
Input: (∗) where ∗ means any number of dimensions.
Target: (∗), same shape as the input.
Output: scalar. If reduction is 'none', then (∗), same shape as the input.