[object Object]

[object Object][object Object]undefined
[object Object]
  • API description: Performs backpropagation of .
  • Formula:gradInput(N,C,floor(scalesH(H+0.5)),floor(scalesW(W+0.5)))+=gradOutput(N,C,H,W)gradInput(N, C, floor ( scalesH * ( H + 0.5 )), floor ( scalesW * ( W+ 0.5 ))) += gradOutput( N, C, H ,W)
[object Object]

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

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

    [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]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

    aclnnStatus: status code. For details, see .

[object Object]
  • The upscaling factor for input data must be less than or equal to 50. That is, both outputSize[0]/heightHofoutputshapeoutputSize[0]/height H of output shape and outputSize[1]/widthWofoutputshapeoutputSize[1]/width W of output shape must be less than or equal to 50.
  • Either the H and W axes of the outputSize parameter or the scalesH and scalesW parameters can be used.
    • If the value of scalesH or scalesW is less than or equal to 0, the value of the corresponding axis in outputSize is used.
    • 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 floor(inputSize_HscalesH)floor(inputSize\_H * scalesH) or floor(inputSize_WscalesW)floor(inputSize\_W * scalesW).
  • Deterministic computing:
    • aclnnUpsampleNearestExact2dBackward defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic computing.
[object Object]

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

[object Object]