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 calls. First, aclnnQuantConvolutionGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnQuantConvolution is called to perform computation.
Parameters:
[object Object]Returns:
aclnnStatus: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown:
[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.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: