Gather

Description

Slices data based on the dimension specified in the input tensor x.

Input

  • x: input tensor of type float16, float, int32, int64, int8, int16, uint8, uint16, uint32, uint64, or bool.
  • indices: input tensor of type int32 or int64.

Attribute

axis: int, specifying the gather axis. The value range is [-r, r-1], where r indicates the rank of the input data.

Output

y: output tensor of the identical data type as input x.

Constraints

Indexes with negative indices are not supported.

ONNX Opset Support

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