Skip to main content

max_abs_norm_dims

Function max_abs_norm_dims 

pub fn max_abs_norm_dims<const D: usize, K, I>(
    x: Tensor<D, K>,
    dims: &[I],
) -> Tensor<D, K>
where I: AsIndex, K: Ordered,
Expand description

Computes the L:INFINITY norm of a tensor along specified dimensions.

If dims is empty, no dimensions are reduced, matching ONNX noop_with_empty_axes=true semantics (the norm transformation is applied elementwise without collapsing axes).

§Arguments

  • x - The input tensor.
  • dims - The dimensions to compute the norm over. Negative dimensions are supported and count from the end.

§Returns

The L:INFINITY norm of the input tensor.