Description: Computes the backward pass of a convolution operation. Based on the output mask settings, it selectively computes gradients for the input, weight, and bias. This function supports 1D, 2D, and 3D convolutions.
Formula:
The relationship between the input tensor (input()), output tensor (out()), stride (), kernel size (), and dilation () is:
The backward pass computes gradients with respect to the forward-pass tensors: the input tensor (corresponding to input in the function prototype), the convolution kernel weights (corresponding to weight in the function prototype), and the bias .
Gradient with respect to , (corresponding to the gradInput parameter in the function prototype):
Where is the loss function and is the gradient of the loss with respect to the output tensor (corresponding to the gradOutput parameter in the function prototype).
Gradient with respect to , (corresponding to the gradWeight parameter in the function prototype):
Gradient with respect to , (corresponding to the gradBias parameter in the function prototype):
Each operator has calls. First, aclnnConvolutionBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, aclnnConvolutionBackward 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][object Object]
Deterministic computation:
- aclnnConvolutionBackward is non-deterministic by default. Deterministic mode can be enabled via aclrtCtxSetSysParamOpt.
- Formula 1:
Due to hardware resource limitations, the operator may fail for certain parameter combinations. Analyze the error logs to diagnose the issue. If the error persists, click to obtain technical support.
The following example is for reference only. For details, see .