ReduceL2

Description

Reduces a dimension of a tensor by calculating the L2 norm (Euclidean norm) of the input tensor element along the provided axis.

If keepdims is set to 1, the generated tensor has the same rank as the input. If keepdims is set to 0, the generated tensor has the dimension pruned. The preceding behavior is similar to that of NumPy. The only difference is that NumPy sets keepdims to False instead of True by default.

Input

x: input tensor of type float16 or float.

Attribute

  • axes: int list, specifying the calculation axis.
  • keepdims: int, indicating whether to retain the reduced dimension. The default value is 1.

Output

y: output tensor of type float16 or float.

Constraints

None.

ONNX Opset Support

Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18.