Compress

Description

Slices data based on the specified axis.

Input

Two inputs:

input: tensor whose dimension is greater than or equal to 1. The supported types are uint8, uint16, uint32, uint64, int8, int16, int32, int64, float16 and float.

condition: 1D tensor, used to specify the slice and elements to be selected. The supported type is bool.

Output

One output:

output: tensor of the identical type as input.

Attribute

(Optional) axis: int, axis for slicing. If no axis is specified, the input tensor is flattened before slicing. The value range is [-r, r - 1], where r is the dimension of the input.

ONNX Opset Support

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