# tensorplay.nn.functional.l1_loss

Source: https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.l1_loss.html

# tensorplay.nn.functional.l1_loss

tensorplay.nn.functional.l1_loss(input: TensorBase, target: TensorBase, size_average=None, reduce=None, reduction: [str](https://docs.python.org/3/library/stdtypes.html#str) = 'mean', weight: TensorBase | [None](https://docs.python.org/3/library/constants.html#None) = None) &#x2192; TensorBase[[source]](../_modules/tensorplay/nn/functional.html#l1_loss)

Compute the L1 loss, with optional weighting.

Function that takes the mean element-wise absolute value difference.
See L1Loss for details.
