[object Object]

[object Object][object Object]undefined
[object Object]
  • Function: Performs backpropagation of .
  • Formulas:gradInput(N,C,D,H,W)+=gradOut(N,C,ceil(scalesDD),ceil(scalesHH),ceil(scalesWW))gradInput(N, C, D, H, W) += gradOut( N, C, ceil ( scalesD * D ), ceil ( scalesH * H ), ceil ( scalesW * W ))
[object Object]

Each operator has calls. First, aclnnUpsampleNearest3dBackwardGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnUpsampleNearest3dBackward is called to perform computation.

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

    [object Object]
  • 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 shape constraints of gradOut and gradInput are as follows:

    • The value of each dimension is less than or equal to 2^20.

    • The N and C axes of gradInput must be the same as those of gradOut.

    • 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

      The values are as follows:

      • 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 inputSize, outputSize, scalesD, scalesH, and scalesW parameters must meet the following constraints:

    outputSize_D=floor(inputSize_DscalesD)outputSize\_D = floor(inputSize\_D * scalesD) outputSize_H=floor(inputSize_HscalesH)outputSize\_H = floor(inputSize\_H * scalesH) outputSize_W=floor(inputSize_WscalesW)outputSize\_W = floor(inputSize\_W * scalesW)
  • Deterministic computation:

    • The deterministic implementation of aclnnUpsampleNearest3dBackward is used by default.
[object Object]

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

[object Object]