[object Object]

[object Object][object Object]undefined
[object Object]

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

  • [object Object]
  • [object Object]
[object Object]
  • Operator description: Performs three-point interpolation calculation based on grad_x, idx, and weight to obtain the gradient grad_y.

  • Formula:

    grad_y[b,c,idx[b,n,i]]=grad_y[b,c,idx[b,n,i]]+grad_x[b,c,n]weight[b,n,i]i[0,2] b[0,B) c[0,C) n[0,N)grad\_y[b,c,idx[b,n,i]] = grad\_y[b,c,idx[b,n,i]] + grad\_x[b,c,n]*weight[b,n,i]\\ i\in[0,2]\ b\in[0,B) \ c\in[0,C) \ n\in[0,N)
[object Object]
  • Parameters:

    • grad_x (aclTensor*, compute input): gradient value of the previous step of network backpropagation. It is an aclTensor on the device. The data type can be FLOAT or FLOAT16. The shape can be (b, c, n). are supported. The can be NCHW.
    • idx (aclTensor*, compute input): three nearest neighbor feature indexes of the target feature. It is an aclTensor on the device. The data type can be INT32 or INT64. The shape can be (b, n, 3). are supported, but empty tensors are not supported. The supports ND.
    • weight (aclTensor*, compute input): three nearest neighbor feature weights of the target feature. It is an aclTensor on the device. The data type can be FLOAT or FLOAT16. The shape can be (b, n, 3). are supported, but empty tensors are not supported. The supports ND.
    • m (uint32_t*, compute input): size of the lowest dimension of the input feature. It derives the shape of grad_y for infershape. The data type can be INT32.
    • grad_y (aclTensor*, compute output): gradient calculation result. It is an aclTensor on the device. The data type can be FLOAT or FLOAT16. The shape can be (b, c, m). are supported, but empty tensors are not supported. The supports NCHW.
    • workspaceSize (uint64_t*, output): size of the workspace to be allocated on the device.
    • executor (aclOpExecutor**, output): operator executor, containing the operator computation process.
  • Returns:

    aclnnStatus: status code. For details, see .

[object Object]
[object Object]
  • Parameters:

    • workspace (void*, input): address of the workspace to be allocated on the device.
    • workspaceSize (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by calling the first-phase API aclnnThreeInterpolateBackwardGetWorkspaceSize.
    • executor (aclOpExecutor*, input): operator executor, containing the operator computation process.
    • stream (aclrtStream, input): stream for executing the task.
  • Returns:

    aclnnStatus: status code. For details, see .

[object Object]
  • The values in idx must be less than m.
  • Deterministic computing:
    • aclnnThreeInterpolateBackward defaults to a non-deterministic implementation. Enabling deterministic computing is not supported.
[object Object]

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

[object Object]