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 backpropagation of convolution needs to calculate the gradients of the input tensor (corresponding to the input in the function prototype), weight tensor (corresponding to the weight in the function prototype), and bias in the forward propagation of convolution.
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
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object][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 .