- API description: Performs backpropagation of .
- Formula:
- Core forward algorithm logic:
- Scale the destination image to the same size as the source image.
- Calculate points of the scaled destination image and points of adjacent source images.
- Calculate the weights from the adjacent points to the target points, and multiply and accumulate the weights to obtain the target point values.
- Calculation logic:
An image can be scaled by corner alignment (that is, based on the center point of the pixels in the upper left corner of the source image) or edge alignment (that is, based on the vertex in the upper left corner and two edges of the source image). The two modes differ in the scaling factor and coordinates. Then:
Therefore, for a point p (x, y) in a direction of the output, a point mapped back to the source image is denoted as q (x', y'). Then:
Denoted:
Then:
Assume that the output image out for forward interpolation is affected by the original image input . Then:
- Core forward algorithm logic:
Each operator has calls. First, aclnnUpsampleBilinear2dBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnUpsampleBilinear2dBackward is called to perform computation.
[object Object]
[object Object]
Parameters:
[object Object]- [object Object]Atlas inference products[object Object], [object Object]Atlas training products[object Object], [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 types of
[object Object]and[object Object]do not support BFLOAT16. - The data type of
[object Object]must be the same as that of[object Object].
- The data types of
- [object Object]Atlas inference products[object Object], [object Object]Atlas training products[object Object], [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]:
Returns
aclnnStatus: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
- Deterministic computing:
- aclnnUpsampleBilinear2dBackward defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]