LpPool
Description
Performs Lp norm pooling. Performs Lp pooling on the input tensor x based on the kernel size, stride size, and padding length. Lp pooling includes calculating an Lp norm of all values of a subset of the input tensor, downsampling data based on a kernel size, and placing the data into an output tensor y for further processing.
Input
x: input tensor of type float16.
Attribute
- auto_pad: string. The default value is NOTSET. The value can be NOTSET, SAME_UPPER, or VALID.
- kernel_shape: int list, indicating the size of each kernel axis.
- p: int, indicating the p value of the Lp norm for pooling input data. The default value is 2.
- pads: int list. The padding is along the start and end of each space axis, and can take any value greater than or equal to 0. The value indicates the number of pixels added at the beginning and end of the corresponding axis. The pads format should be as follows: [x1_begin, x2_begin...x1_end, x2_end, ...], where xi_begin is the number of pixels added at the beginning of axis i, and xi_end is the number of pixels added at the end of axis i. This attribute cannot be used together with the auto_pad attribute. If this attribute is not specified, the padding at the beginning and end of each spatial axis is 0 by default.
- strides: int list, indicating the strides along each space axis. If this attribute is not specified, the stride of each spatial axis is 1 by default.
The auto_pad attribute supports SAME_UPPER but does not support SAME_LOWER because both SAME_LOWER and SAME_UPPER use the SAME attribute of TBE. However, TBE operators do not differentiate the padding position based on this attribute, which may result in accuracy issues.
Output
y: output tensor of the identical data type and shape to the input.
Constraints
None.
ONNX Opset Support
Opset v11/v12/v13/v14/v15/v16/v17/v18
Parent topic: Supported ONNX Operators