[object Object]

📄

[object Object][object Object]undefined
[object Object]
  • Description: Flattens the tensor self and repeats the tensor for the corresponding number of times in repeats.

  • Example: Assume that the input tensor is ([[a, b], [c, d], [e, f]]) and repeats is ([1, 2, 2, 1, 1, 1]). The generated tensor is ([a, b, b, c, c, d, e, f]) with eight elements, same as the sum of all elements in repeats. After the tensor is flattened, the input is converted into ([a, b, c, d, e, f]). The tensor is repeated in one-to-one correspondence with repeats. a is repeated once, b is repeated twice, c is repeated twice, and so on.

    Assume that the input tensor is ([[a, b], [c, d], [e, f]]) and repeats is ([2]). In this case, the generated tensor is ([a, a, b, b, c, c, d, d, e, e, f, f]). After the tensor is flattened, the input is converted into ([a, b, c, d, e, f]). Each element in the tensor is repeated based on the number of element times specified by repeats, that is, each element is repeated twice. Note: This scenario is equivalent to repeats being (2).

[object Object]

Each operator has calls. First, aclnnRepeatInterleaveGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnRepeatInterleave 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:
    • aclnnRepeatInterleave 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 number of elements 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 repeats contains only one element, outputSize = Number of elements in self x Value of repeats. If repeats contains multiple values, outputSize = Sum of repeats.
[object Object]

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

[object Object]