[object Object]

[object Object][object Object]undefined
[object Object]
  • API description: Performs backpropagation of . If the shape of the input tensor is (N, C, H, W), then the shape of the output tensor is (N, C, inputSize[2], inputSize[3]).

  • Formula: For a two-dimensional interpolation point (N,C,h,w)(N, C, h, w), the interpolation gradInput(N,C,h,w)gradInput(N, C, h, w) may be represented as:

    gradInput(N,C,h,w)=i=03j=03W(i,j)f(hi,wj){gradInput(N, C, h, w)}=\sum_{i=0}^{3}\sum_{j=0}^{3}{W(i, j)}*{f(h_i, w_j)} scaleH={(inputSize[2]1)/(outputSize[0]1)alignCorners=true1/scalesHalignCorners=false&scalesH>0inputSize[2]/outputSize[0]otherwisescaleH =\begin{cases} (inputSize[2]-1) / (outputSize[0]-1) & alignCorners=true \\ 1 / scalesH & alignCorners=false\&scalesH>0\\ inputSize[2] / outputSize[0] & otherwise \end{cases} scaleW={(inputSize[3]1)/(outputSize[1]1)alignCorners=true1/scalesWalignCorners=false&scalesW>0inputSize[3]/outputSize[1]otherwisescaleW =\begin{cases} (inputSize[3]-1) / (outputSize[1]-1) & alignCorners=true \\ 1 / scalesW & alignCorners=false\&scalesW>0\\ inputSize[3] / outputSize[1] & otherwise \end{cases}

    The values are as follows:

    • i and j are index variables of W(i,j)W(i, j).
    • f(hi,wj)f(h_i, w_j) is the pixel value of gradOut in (hi,wj)(h_i, w_j).
    • W(i,j)W(i, j) is the weight of the bicubic anti-aliasing interpolation, which is defined as follows:W(d)={(a+2)d3(a+3)d2+1d1ad35ad2+8ad4a1<d<20otherwiseW(d) =\begin{cases} (a+2)|d|^3-(a+3)|d|^2+1 & |d|\leq1 \\ a|d|^3-5a|d|^2+8a|d|-4a & 1<|d|<2 \\ 0 & otherwise \end{cases} The values are as follows:
      • a=0.75a=-0.75
      • d=(h,w)(hi,wj)d = |(h, w) - (h_i, w_j)|
[object Object]

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

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

    [object Object]
    • [object Object]Atlas training products[object Object]:

      • The data types of gradOut and gradInput do not support BFLOAT16.
      • The data formats of gradOut and gradInput do not support NHWC.
    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:

      The data formats of gradOut and gradInput do not support NHWC.

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

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

    aclnnUpsampleBicubic2dBackward defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic computing. Deterministic computation is not supported when the following conditions are met:

    • inputSize_WinputSize\_W > 130000
    • inputSize_HinputSize\_H/outputSize_HoutputSize\_H >=50
    • inputSize_WinputSize\_W/outputSize_WoutputSize\_W >=50 && inputSize_NinputSize\_N * inputSize_CinputSize\_C * inputSize_HinputSize\_H > inputSize_WinputSize\_W * 0.5
    • inputSize_HinputSize\_H/outputSize_HoutputSize\_H < 0.02 && inputSize_WinputSize\_W/outputSize_WoutputSize\_W < 0.02 && inputSize_NinputSize\_N * inputSize_CinputSize\_C * inputSize_HinputSize\_H > inputSize_WinputSize\_W * 10000
[object Object]

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

[object Object]