(l-onnx-doc-MaxRoiPool)= # MaxRoiPool (l-onnx-op-maxroipool-22)= ## MaxRoiPool - 22 ### Version - **name**: [MaxRoiPool (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#MaxRoiPool) - **domain**: `main` - **since_version**: `22` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 22**. ### Summary ROI max pool consumes an input tensor X and region of interests (RoIs) to apply max pooling across each RoI, to produce output 4-D tensor of shape (num_rois, channels, pooled_shape[0], pooled_shape[1]). ### Attributes * **pooled_shape - INTS** (required) : ROI pool output shape (height, width). * **spatial_scale - FLOAT** (default is `'1.0'`): Multiplicative spatial scale factor to translate ROI coordinates from their input scale to the scale used when pooling. ### Inputs - **X** (heterogeneous) - **T**: Input data tensor from the previous operator; dimensions for image case are (N x C x H x W), where N is the batch size, C is the number of channels, and H and W are the height and the width of the data. - **rois** (heterogeneous) - **T**: RoIs (Regions of Interest) to pool over. Should be a 2-D tensor of shape (num_rois, 5) given as [[batch_id, x1, y1, x2, y2], ...]. ### Outputs - **Y** (heterogeneous) - **T**: RoI pooled output 4-D tensor of shape (num_rois, channels, pooled_shape[0], pooled_shape[1]). ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input and output types to float tensors. ```{toctree} text_diff_MaxRoiPool_1_22 ``` (l-onnx-op-maxroipool-1)= ## MaxRoiPool - 1 ### Version - **name**: [MaxRoiPool (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#MaxRoiPool) - **domain**: `main` - **since_version**: `1` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 1**. ### Summary ROI max pool consumes an input tensor X and region of interests (RoIs) to apply max pooling across each RoI, to produce output 4-D tensor of shape (num_rois, channels, pooled_shape[0], pooled_shape[1]). ### Attributes * **pooled_shape - INTS** (required) : ROI pool output shape (height, width). * **spatial_scale - FLOAT** (default is `'1.0'`): Multiplicative spatial scale factor to translate ROI coordinates from their input scale to the scale used when pooling. ### Inputs - **X** (heterogeneous) - **T**: Input data tensor from the previous operator; dimensions for image case are (N x C x H x W), where N is the batch size, C is the number of channels, and H and W are the height and the width of the data. - **rois** (heterogeneous) - **T**: RoIs (Regions of Interest) to pool over. Should be a 2-D tensor of shape (num_rois, 5) given as [[batch_id, x1, y1, x2, y2], ...]. ### Outputs - **Y** (heterogeneous) - **T**: RoI pooled output 4-D tensor of shape (num_rois, channels, pooled_shape[0], pooled_shape[1]). ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input and output types to float tensors.