Description: Performs the two-dimensional inverse operation of . outputSize determines the size of out along the H and W axes, fills elements of self in out based on indices, and sets other positions to 0.
Formula:
out, indices, and self are obtained by reshaping the axis combined from the last two axes, that is, i ∈ [0, H*W).
Each operator has calls. First, aclnnMaxUnpool2dGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnMaxUnpool2d is called to perform computation.
[object Object][object Object]
Parameters:
- self (aclTensor*, compute input): input
[object Object]in the formula, aclTensor on the device. The data type can be FLOAT, FLOAT16, INT16, INT32, INT64, INT8, UINT8, or DOUBLE, and must be the same as that of out. The shape is the same as that of indices. are supported. The can be ND or NCHW. The shape can be three-dimensional (C, H, W) or four-dimensional (N, C, H, W), where C indicates the number of channels, N indicates the batch size, H indicates height, and W indicates width. - indices (aclTensor*, compute input): input
[object Object]in the formula, aclTensor on the device. It indicates the indices of the elements of self in the output result. The data type can be INT64 or INT32, and the shape must be the same as that of self. are supported. The can be ND or NCHW. The shape can be three-dimensional (C, H, W) or four-dimensional (N, C, H, W), where C indicates the number of channels, N indicates the batch size, H indicates height, and W indicates width. - outputSize (aclIntArray*, compute input): spatial size of the output result in the H and W dimensions, aclIntArray on the host. The size is 2. The product of two elements must be greater than or equal to the product of sizes of self in the H and W dimensions.
- out (aclTensor*, compute output): output
[object Object]in the formula, aclTensor on the device. The data type can be FLOAT, FLOAT16, INT16, INT32, INT64, INT8, UINT8, or DOUBLE, and must be the same as that of self. are supported. The can be ND or NCHW. The shape can be three-dimensional (C, H, W) or four-dimensional (N, C, H, W), where C indicates the number of channels, N indicates the batch size, H indicates height, and W indicates width. - workspaceSize (uint64_t*, output): size of the workspace to be allocated on the device.
- executor (aclOpExecutor**, output): operator executor, containing the operator computation process.
- self (aclTensor*, compute input): input
Returns:
[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 aclnnMaxUnpool2dGetWorkspaceSize.
- executor (aclOpExecutor*, input): operator executor, containing the operator computation process.
- stream (aclrtStream, input): stream for executing the task.
Returns:
- Deterministic compute:
- aclnnMaxUnpool2d defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]