[object Object]

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

Description: Performs backpropagation of the MaxPool2d inverse operation (), writing element values of gradOutput in out based on indices.

out[n][c][i]=gradOutput[n][c][indices[n][c][i]]out[n][c][i] = gradOutput[n][c][indices[n][c][i]]

out, gradOutput, and indices are obtained by reshaping the axis combined from the last two axes, that is, i[0,HW)i ∈ [0, H*W). H and W represent the last two axes.

[object Object]

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

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

    • gradOutput (aclTensor*, compute input): [object Object] in the formula, aclTensor on the device. The data type can be FLOAT, FLOAT16, INT32, INT64, INT16, INT8, UINT8, or BOOL. The data type must be convertible to that of out (see ), and must be the same as that of self. The shape must be (N, C, outputSize[0], outputSize[1]) or (C, outputSize[0], outputSize[1]), and be the same as that of self. are supported. The can be ND.

    • self (aclTensor*, compute input): aclTensor on the device. The data type can be FLOAT, FLOAT16, INT32, INT64, INT16, INT8, UINT8, or BOOL, and must be the same as that of gradOutput. The shape must be (N, C, H, W) or (C, H, W), and must be the same as that of indices. are supported. The can be ND.

    • indices (aclTensor*, compute input): [object Object] in the formula, aclTensor on the device. The data type can be INT64 or INT32. The shape must be the same as that of self. are supported. The can be ND.

    • outputSize (aclIntArray*, compute input): aclIntArray on the host. The number of elements must be 2, and the element values must be the same as the last two dimensions of the shape of gradOutput.

    • out (aclTensor*, compute output): [object Object] in the formula, aclTensor on the device. The data type can be FLOAT, FLOAT16, INT32, INT64, INT16, INT8, UINT8, or BOOL. The shape must be the same as that of self. are supported. The can be ND.

    • 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 the first-phase API aclnnMaxUnpool2dBackwardGetWorkspaceSize.
    • 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]
  • Deterministic compute:
    • aclnnMaxUnpool2dBackward defaults to a deterministic implementation.
[object Object]

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

[object Object]