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]:
- When
Each operator has calls. First, aclnnConvolutionGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, aclnnConvolution 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 computation:
- aclnnConvolution defaults to a deterministic implementation.
The following example is for reference only. For details, see .