[object Object]

[object Object][object Object]undefined
[object Object]
  • 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 ×\times \prod (kernel_size), L) for 3D or (C ×\times \prod (kernel_size), L) for 2D, where L is the total number of such blocks.

  • Formula:

    L=dspatial_size[d]+2×padding[d]dilation[d]×(kernel_size[d]1)1stride[d]+1L = \prod_{d} \lfloor \frac{spatial\_size[d] + 2 \times padding[d] - dilation[d] \times (kernel\_size[d] -1) -1}{stride[d]} + 1 \rfloor, where spatial_size is formed by H and W of the input tensor.

[object Object]

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]
[object Object]
  • 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]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computing:
    • [object Object] defaults to a deterministic implementation.
[object Object]

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

[object Object]