Operator description: Extracts sliding local blocks from a batched input tensor and combines an array of sliding local blocks into a large tensor.
Formulas:
Consider a batched input tensor with shape , where is the batch dimension, is the channel dimension, and represents any spatial dimension.
This operation flattens each sliding block of size kernel_size in the input spatial dimension into a column (i .e., the last dimension) of a 3D output tensor with shape .
The values are as follows:
is the number of values in each block (a block has spatial locations, and each spatial location contains a channel vector), and is the total number of these blocks.
The spatial_size is formed by the spatial dimensions of the input (the above), and covers all spatial dimensions. Therefore, in the last dimension (column) index, the output gives all values in a block.
Each operator has calls. First, aclnnIm2colBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnIm2colBackward is called to perform computation.
Parameters
[object Object]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]
None
The following example is for reference only. For details, see .