Function l1_norm
pub fn l1_norm<B, const D: usize, K>(
x: Tensor<B, D, K>,
dim: usize,
) -> Tensor<B, D, K>
Expand description
Computes the L1 norm of a tensor along a specified dimension.
This is a convenience function that wraps vector_norm
with p = 1.0
.
§Arguments
x
- The input tensor.
dim
- The dimension to compute the norm over.
§Returns
The L1 norm of the input tensor.