- 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), then the output shape is (N, C, outputSize[0], outputSize[1]).
- Formula:
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] 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 FLOAT 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]
The shape constraints of
[object Object]and[object Object]are as follows:- The value of each dimension is less than or equal to 2^20.
- The N and C axes of
[object Object]must be the same as those of[object Object]. - The memory usage must be less than 60 GB. The memory size can be calculated according to the following formula:
Where,
- N indicates the N axis of the input and output.
- C indicates the C axis of the input and output.
Deterministic computing:
- aclnnUpsampleNearest2d defaults to a deterministic implementation.
The following example is for reference only. For details, see .