This API is used to perform per-channel quantized 3D convolution computation. The weight supports only the FRACTAL_Z_3D format. The convolution computation process is the same as that of the aclnnConvolution API.
Formula:
Assume that the shape of the input is , the original shape of the weight is , the shape of the scale is , the shape of the bias is , and the shape of the output 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 represented 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 computation
- The default deterministic implementation of aclnnQuantConvolutionWeightNz is used.
The following example is for reference only. For details, see .
For different product models, use different main functions.