API description: Applies the nearest neighbor interpolation algorithm to upsample the input signal composed of several input channels. If the input shape is (N, C, H, W), the output shape is (N, C, outputSize[0], outputSize[1]). Compared with , this API adds the input parameters scalesH and scalesW. You should select a proper API based on the actual situation.
Formula:
Each operator has calls. First, aclnnUpsampleNearest2dV2GetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnUpsampleNearest2dV2 is called to perform computation.
Parameters:
[object Object][object Object]Atlas inference products[object Object] and [object Object]Atlas training products[object Object]:
The data types of the input parameter
[object Object]and output parameter[object Object]do not support FLOAT32 or BFLOAT16.
Returns:
aclnnStatus: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
- Either outputSize or scalesH/scalesW must be used.
- If the value of scalesH or scalesW is less than or equal to 0, the value of outputSize is used.
- If the values of scalesH and scalesW are greater than 0, the values of scalesH and scalesW are used, .
- Deterministic computing:
- aclnnUpsampleNearest2dV2 defaults to a deterministic implementation.
The following example is for reference only. For details, see .