[object Object]

[object Object][object Object]undefined
[object Object]
  • Function: Performs backpropagation of .
  • Formula:scalesD=outputSize[0]/inputSize[2]scalesD = outputSize[0] / inputSize[2] scalesH=outputSize[1]/inputSize[3]scalesH = outputSize[1] / inputSize[3] scalesW=outputSize[2]/inputSize[4]scalesW = outputSize[2] / inputSize[4] gradInput(N,C,floor(scalesD(D+0.5)),floor(scalesH(H+0.5)),floor(scalesW(W+0.5)))+=gradOutput(N,C,D,H,W)gradInput(N, C, floor ( scalesD * ( D + 0.5 )), floor ( scalesH * ( H + 0.5 )), floor ( scalesW * ( W+ 0.5 ))) += gradOutput( N, C, D, H ,W)
[object Object]

Each operator has calls. First, aclnnUpsampleNearestExact3dBackwardGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnUpsampleNearestExact3dBackward 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 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:

      NC(gradOut_DgradOut_HgradOut_W+gradInput_DgradInput_HgradInput_W+gradOut_DgradOut_HgradInput_W+gradOut_DgradInput_HgradInput_W)sizeof(float)<60102410241024N * C * (gradOut\_D * gradOut\_H * gradOut\_W + gradInput\_D * gradInput\_H * gradInput\_W + gradOut\_D * gradOut\_H * gradInput\_W + gradOut\_D * gradInput\_H * gradInput\_W) * sizeof(float) < 60 * 1024 * 1024 * 1024

      Where,

      • N indicates the N axis of the input and output.
      • C indicates the C axis of the input and output.
    • N * C * gradOut_D * gradOut_H < 2^31

    • gradInput_W * gradInput_H < 2^31

  • If the data formats of gradOut and gradInput are not NCDHW or NDHWC, the input data is processed as NCDHW by default.
  • The upscaling factor for input data must be less than or equal to 50. That is, outputSize[0]/heightHofoutputshapeoutputSize[0]/height H of output shape, outputSize[1]/widthWofoutputshapeoutputSize[1]/width W of output shape, and outputSize[2]/depthDofoutputshapeoutputSize[2]/depth D of output shape must be less than or equal to 50.
  • Either outputSize or scalesD/scalesH/scalesW must be used.
    • If the value of scalesD, scalesH, or scalesW is less than or equal to 0, the value of outputSize is used.
    • If the values of scalesD, scalesH, and scalesW are greater than 0, the values of scalesD, scalesH, and scalesW are used, and outputSize=[floor(inputSize_DscalesD),floor(inputSize_HscalesH),floor(inputSize_WscalesW)]outputSize = [floor(inputSize\_D * scalesD), floor(inputSize\_H * scalesH), floor(inputSize\_W * scalesW)].
  • Deterministic computing:
    • aclnnUpsampleNearestExact3dBackward 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]