Function l0_norm
pub fn l0_norm<const D: usize, K>(
x: Tensor<D, K>,
dim: impl AsIndex,
) -> Tensor<D, K>
Expand description
Computes the L0 norm of a tensor along a specified dimension.
§Arguments
x - The input tensor.
dim - The dimension to compute the norm over.
Negative dimensions are supported and count from the end.
§Returns
The L0 norm of the input tensor.