API description: Performs backpropagation of . If the shape of the input tensor is (N, C, H, W), then the shape of the output tensor is (N, C, inputSize[2], inputSize[3]).
Formula: For a two-dimensional interpolation point , the interpolation may be represented as:
Where,
- i and j are index variables of .
- is the pixel value of gradOut in .
- is the weight of the bicubic anti-aliasing interpolation, which is defined as follows:
Where,
Each operator has calls. First, aclnnUpsampleBicubic2dBackwardGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnUpsampleBicubic2dBackward is called to perform computation.
Parameters:
[object Object][object Object]Atlas training products[object Object]:
- The data types of
[object Object]and[object Object]do not support BFLOAT16. - The data formats of
[object Object]and[object Object]do not support NHWC.
- The data types of
[object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
The data formats of
[object Object]and[object Object]do not support NHWC.
Returns:
aclnnStatus: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
Either the H and W axes of the outputSize parameter or the scalesH and scalesW parameters can be used.
- When alignCorners is set to True:
- If the value of the corresponding axis of outputSize is equal to 1, the value of the corresponding axis of scales is 0.
- In other cases, the values of the corresponding axes in the input parameters inputSize and outputSize are used, and .
- If alignCorners is set to False:
- If the value of scalesH or scalesW is less than or equal to 0, the value of the corresponding axis in outputSize is used, that is, .
- If the value of scalesH or scalesW is greater than 0, the value of scalesH or scalesW is used. That is, the value of the corresponding axis of outputSize is or .
- When alignCorners is set to True:
Deterministic computing:
aclnnUpsampleBicubic2dBackward defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic computing. A deterministic implementation must meet the following conditions:
- inputSize[3] > 130000
- scaleH >=50
- scaleW >=50 && inputSize[0] * inputSize[1] * inputSize[2] > inputSize[3] * 0.5
- scaleH < 0.02 && scaleW < 0.02 && inputSize[0] * inputSize[1] * inputSize[2] > inputSize[3] * 10000
The following example is for reference only. For details, see .