[object Object]

[object Object][object Object]undefined
[object Object]
  • 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]).
  • Formulas:hsrc=min(floor((hdst+0.5)/scalesH),H1),scalesH=outputSize[0]/Hh_{src} = min(floor((h_{dst} + 0.5) / scalesH), H - 1),scalesH = outputSize[0] / H wsrc=min(floor((wdst+0.5)/scalesW),W1),scalesW=outputSize[1]/Ww_{src} = min(floor((w_{dst} + 0.5) / scalesW), W - 1),scalesW = outputSize[1] / W out(N,C,hdst,wdst)=self(N,C,hsrc,wsrc)out(N, C, h_{dst}, w_{dst}) = self(N, C, h_{src}, w_{src})
[object Object]

Each operator has calls. First, aclnnUpsampleNearestExact2dGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnUpsampleNearestExact2d is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
    • [object Object]Atlas inference products[object Object]

      The data types of self and out support only FLOAT32 and FLOAT16.

  • Returns:

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter validation. The following error codes may be returned.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
  • The parameters self, outputSize, scalesH, and scalesW must meet the following restrictions:

    outputSize_H=floor(self_HscalesH)outputSize\_H = floor(self\_H * scalesH) outputSize_W=floor(self_WscalesW)outputSize\_W = floor(self\_W * scalesW)
  • Deterministic computation:

    • aclnnUpsampleNearestExact2d defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]