- Description: Rearranges sliding image neighborhoods into column vectors, and concatenates them into large tensors. The sliding windows are extracted from the batch-processing input tensor. Consider a batch-processing input tensor whose shape is (N, C, H, W) or (C, H, W), where
[object Object]is the batch-processing dimension,[object Object]is the channel dimension, and[object Object]and[object Object]indicate the image size. This operation flattens each sliding kernel_size block in the spatial dimension of the input to 3D of (N, C (kernel_size), L) or column (the last dimension) of the 2D output tensor of (C (kernel_size), L), where[object Object]is the total number of these blocks. - Formula:
\rfloor, where
[object Object]consists of[object Object]and[object Object]of the input tensor.
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.
[object Object][object Object]
Parameters:
[object Object](aclTensor*, computation input): aclTensor on the device. The shape is 3- or 4-dimensional, and the data type can be FLOAT, FLOAT16, or BFLOAT16. are supported. The can be ND.[object Object](aclIntArray*, computation input): aclIntArray on the NPU host, size of the convolution kernel. The size is 2. The data type is INT64.[object Object](aclIntArray*, computation input): aclIntArray on the NPU host, dilation parameter. The size is 2. The data type is INT64.[object Object](aclIntArray*, computation input): aclIntArray on the NPU host, convolutional padding size. The size is 2, and the data type is INT64.[object Object]indicates the padding size in the H direction, and[object Object]indicates the padding size in the W direction.[object Object](aclIntArray*, computation input): aclIntArray on the NPU host, convolution stride. The size is 2. The data type is INT64.[object Object](aclTensor*, computation output): aclTensor on the device. The shape is 2-dimensional (for 3-dimensional input) or 3-dimensional (for 4-dimensional input). The data type can be FLOAT, FLOAT16, or BFLOAT16. are supported. The shape is deduced based on the preceding parameters. The supports ND.[object Object](uint64_t*, output): size of the workspace to be allocated on the device.[object Object](aclOpExecutor**, output): operator executor, containing the operator computation process.
Returns:
[object Object]
Parameters:
[object Object](void*, input): address of the workspace to be allocated on the device.[object Object](uint64_t, input): size of the workspace to be allocated on the device, which is obtained by the first-phase API[object Object].[object Object](aclOpExecutor*, input): operator executor, containing the operator computation process.[object Object](aclrtStream, input): stream for executing the task.
Returns:
- Deterministic computing:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]