API function:
Rearranges sliding image neighborhoods into column vectors, and concatenates them into large tensors. The sliding windows are extracted from the batch-processing input tensor.
Given a batch input tensor of shape (N, C, H, W) or (C, H, W), where N is the batch dimension, C is the channel dimension, and H and W represent the image size, this operation flattens each sliding block of size kernel_size within the spatial dimensions of the input into a column (i.e., the last dimension) of the output tensor of shape (N, C (kernel_size), L) for 3D or (C (kernel_size), L) for 2D, where L is the total number of such blocks.
Formula:
, where spatial_size is formed by H and W 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.
Parameters:
[object Object]- For [object Object]Atlas A3 training products/Atlas A3 inference products[object Object] and [object Object]Atlas A2 training products/Atlas A2 inference products[object Object], only FLOAT, FLOAT16, and BFLOAT16 are supported.
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]
- Deterministic computing:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .