- API function: Performs max pooling on the three-dimensional or four-dimensional input tensor.
- Formula:
When ceilMode is set to False, the H and W dimensions in the shape of the out tensor are deduced as follows:
When ceilMode is set to True, the H and W dimensions in the shape of the out tensor are deduced as follows:
- If the upper left corner of the sliding window starts from the lower or right padding or goes off-bounds (no valid value can be obtained), the sliding window result is discarded. The shape of the corresponding spatial axis needs to be subtracted by 1 based on the preceding deduction formula.
Each operator has calls. First, aclnnMaxPoolGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnMaxPool is called to perform computation.
[object Object]
[object Object]
Parameters:
[object Object]- For [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object], the data types of the self and out parameters do not support BFLOAT16, INT32, INT64, UINT8, INT16, INT8, and UINT16.
Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]
- Deterministic compute:
- aclnnMaxPool defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]