Description: Implements convolution operations, supporting 1D, 2D, and 3D convolutions, as well as transposed convolution, dilated convolution, and grouped convolution. When
[object Object], the operator performs transposed convolution (also known as fractionally-strided convolution). This can be viewed as the gradient or inverse operation of regular convolution: it maps the output shape back to the input shape while maintaining a connection pattern compatible with convolution. Its parameters are similar to those of regular convolution, including input channels, output channels, kernel size, stride, padding, output padding, groups, bias, and dilation.Formula:
Assume the input tensor has shape , the weight tensor has shape , and the output tensor has shape , where denotes the batch size, denotes the number of channels, , , and denote the depth, height, and width of the sample respectively, and , , and denote the depth, height, and width of the kernel respectively. The output is then expressed as:
Where denotes the convolution operation, whose exact computation depends on the input dimensionality and the convolution type (dilated or grouped). denotes the batch size, denotes the number of channels, and , , and denote the depth, height, and width, respectively. The formulas for computing the corresponding output dimensions are as follows:
When
[object Object]:When
[object Object]:
Each operator has [object Object]two-phase API calls[object Object]. You must call aclnnConvolutionGetWorkspaceSize to obtain the workspace size required for computation and the executor that contains the operator computation process, and then call aclnnConvolution to perform the computation.
Parameters
[object Object]Return Value
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]Return Value
aclnnStatus: return status code. For details, see [object Object]aclnn Return Codes[object Object].
- Deterministic computation:
- aclnnConvolution defaults to a deterministic implementation.
The following example is for reference only. For details, see .