MaxPool

Description

Performs max pooling.

Input

One input:

x: tensor of type float16, in NCHW format.

Output

One output:

y: tensor of type float16, in NCHW format.

Property

auto_pad: (optional) selected from SAME_UPPER, VALID, and NOTSET.

storage_order: This parameter is not supported currently.

kernel_shape: (optional)

  • kernel_shape[0]: int32, window size along the H dimension. Must be in the range of [1, 32768], defaults to 1.
  • kernel_shape[1]: int32, window size along the W dimension. Must be in the range of [1, 32768], defaults to 1.

strides: (optional)

  • strides[0]: int32, stride along the H dimension. Defaults to 1.
  • strides[1]: int32, stride along the W dimension. Defaults to 1.

pads: (optional)

  • pads[0]: int32, top padding. Defaults to 0.
  • pads[1]: int32, bottom padding. Defaults to 0.
  • pads[2]: int32, left padding. Defaults to 0.
  • pads[3]: int32, right padding. Defaults to 0.

ceil_mode: (optional) int32, either 0 (floor mode) or 1 (ceil mode). Defaults to 0.

Constraints

When the strides[0] or strides[1] is greater than 63, the AI CPU is used for computing, which deteriorates the performance.

If the value of kernel_shape[0] or kernel_shape[1] exceeds the value of [1,255] or kernel_shape[0] * kernel_shape[1] > 256, the AI CPU is used for computing, which deteriorates the performance.

1 <= input_w <= 4096.

If N of the input tensor is a prime number, N must be less than 65535.

The 2D tensor input does not support dilations.

When auto_pad is VALID, ceil_mode must be 0.

The pads and auto_pad attributes cannot be used at the same time.

ONNX Opset Support

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