[object Object]

📄

[object Object][object Object]undefined
[object Object]
  • This API is used to repeat each element in the tensor for the number of times specified by the corresponding element in the repeats tensor along the specified dimension.

  • Example: Assume that the input tensor is [[a, b], [c, d], [e, f]]. repeats is ([1, 2, 3]), and dim is 0. In this case, the generated tensor is ([[a, b], [c, d], [c, d], [e, f], [e, f], [e, f]]). In the dimension with dim = 0, a and b are repeated once, c and d are repeated twice, and e and f are repeated three times.

    Assume that the input tensor is ([[a, b], [c, d], [e, f]]). repeats is ([2]), and dim is 0. In this case, the generated tensor is [ [a, b], [a, b], [c, d], [c, d], [e, f], [e, f]]. In the dimension with dim = 0, a and b are repeated twice, c and d are repeated twice, and e and f are repeated twice. Note: This scenario is equivalent to repeats being (2).

[object Object]

Each operator has calls. First, aclnnRepeatInterleaveWithDimGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnRepeatInterleaveWithDim 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 verification. The following errors may be thrown:

    [object Object]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

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

[object Object]
  • Deterministic compute:
    • aclnnRepeatInterleaveWithDim defaults to a deterministic implementation.
  • Input shape restriction: repeats can only be a 0D or 1D tensor. For a one-dimensional tensor, the size of repeats must be 1 or equal to the size of the dim dimension of self.
  • Input value range restriction: The value in the repeats tensor must be a natural number.
  • Other restrictions: The value of outputSize must be calculated as follows: When there is only one element in repeats, outputSize = size of the dimension of self * value of repeats. When there are multiple values in repeats, outputSize = sum of the values in repeats.
[object Object]

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

[object Object]