Computes the size of each kernel based on the input outputSize, performs 2D max pooling on the input self, and outputs the pooled value out and index indices. The difference between aclnnAdaptiveMaxPool2d and aclnnMaxPool2d is that you only need to specify the outputSize size and divide the pooling region based on the outputSize size.
Each operator has calls. First, aclnnAdaptiveMaxPool2dGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnAdaptiveMaxPool2d is called to perform computation.
Parameters:
[object Object]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:
- aclnnAdaptiveMaxPool2d defaults to a deterministic implementation.
Shape description:
- self.shape = (N, C, Hin, Win) or ( C, Hin, Win) or ( N, Hin, Win, C)
- outputSize = [Hout, Wout]
- outputOut.shape = (N, C, Hout, Wout) or ( C, Hout, Wout ) or ( N, Hout, Wout, C)
- indicesOut.shape = (N, C, Hout, Wout) or (C, Hout, Wout) or (N, Hout, Wout, C)
The following example is for reference only. For details, see .