Function l2_norm
pub fn l2_norm<B, const D: usize>(x: Tensor<B, D>, dim: usize) -> Tensor<B, D>
Expand description
Computes the L2 norm of a tensor along a specified dimension.
§Arguments
x
- The input tensor.
dim
- The dimension to compute the norm over.
§Returns
The L2 norm of the input tensor.