[object Object]

[object Object][object Object]undefined
[object Object]
  • 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 (N,C,)(N,C,*), where NN is the batch dimension, CC 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 (N,C×(kernel_size),L)(N,C×\prod(kernel\_size),L).

    The values are as follows:

    • C×(kernel_size)C×\prod(kernel\_size) is the number of values in each block (a block has (kernel_size)\prod(kernel\_size) spatial locations, and each spatial location contains a CC channel vector), and LL is the total number of these blocks.

      L=dspatial_size[d]+2×padding[d]dilation[d]×(kernel_size[d]1)1stride[d]+1L=\prod_d⌊{\frac{spatial\_size[d]+2×padding[d]−dilation[d]×(kernel\_size[d]−1)−1}{stride[d]}+1}⌋
    • The spatial_size is formed by the spatial dimensions of the input (the * above), and dd covers all spatial dimensions. Therefore, in the last dimension (column) index, the output gives all values in a block.

[object Object]

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.

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

    [object Object]
  • Returns:

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

[object Object]

None

[object Object]

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

[object Object]