Compress
Description
Selects a slice from the input tensor along a given axis. The condition calculation result of each axis index is True.
Input
- input: tensor of type uint8, uint16, uint32, uint64, int8, int16, int32, int64, float16 or float, for rank r>=1.
- condition: 1D tensor of type bool, specifying the slice and the elements to be selected.
Attribute
axis (optional): int, axis for slicing. If axis is not provided, the input is flattened before the element is selected. The value range is [-r, r - 1], where r is the dimension of the input.
Output
output: output tensor. If axis is specified, the tensor is of rank r. Otherwise, the tensor is of rank 1. The data type is the same as that of the input.
Constraints
None.
ONNX Opset Support
Opset v9/v10/v11/v12/v13/v14/v15/v16/v17/v18
Parent topic: Supported ONNX Operators