Function vector_norm
pub fn vector_norm<const D: usize>(
x: Tensor<D>,
norm: impl Into<Norm>,
dim: impl AsIndex,
) -> Tensor<D>Expand description
Computes the vector norm of a tensor along a specified dimension.
Generic dispatch wrapper over specialized / optimized norms.
See:
§Arguments
x- The input tensor.norm- The selected norm.dim- The dimension to compute the norm over. Negative dimensions are supported and count from the end.
§Returns
The vector norm of the input tensor.