Description: Performs two-dimensional and three-dimensional convolution for per-channel quantization. The convolution process is the same as that of aclnnConvolution.
Formula: Assume that the input shape is , the weight shape is , the scale shape is , the bias shape is , and the output shape is , where indicates the batch size, indicates the number of channels, , , and indicate the depth, height, and width of the sample, respectively, and , , and indicate the depth, height, and width of the convolution kernel, respectively. Then, the output is expressed as follows:
where indicates convolution compute, which is based on dimension of the convolution input and the convolution type (atrous convolution or group convolution). indicates the batch size, indicates the number of channels, and , , and indicate the depth, height, and width, respectively. The formulas for computing the corresponding output dimensions are as follows:
Each operator has [object Object]two-phase API][object Object]. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.
Parameters
[object Object]Returns
aclnnStatus: status code. For details, see [object Object]aclnn Return Codes[object Object].
The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
Parameters
[object Object]Returns
aclnnStatus: status code. For details, see [object Object]aclnn Return Codes[object Object].
- Deterministic compute
- aclnnQuantConvolution defaults to a deterministic implementation.
The following example is for reference only. For details, see .
For different product models, use different main functions.