You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.repeat_elements.rst 664 B

12345678910111213141516
  1. mindspore.ops.repeat_elements
  2. ===============================
  3. .. py:function:: mindspore.ops.repeat_elements(x, rep, axis=0)
  4. 根据指定轴复制输入Tensor的元素,类似np.repeat的功能。
  5. **参数:**
  6. - **x** (Tensor) - 输入Tensor。类型为float16、float32、int8、uint8、int16、int32或int64。
  7. - **rep** (int) - 指定复制次数,为正数。
  8. - **axis** (int) - 指定复制轴,默认为0。
  9. **输出:**
  10. Tensor,值沿指定轴复制。如果 `x` 的shape为 :math:`(s1, s2, ..., sn)` ,轴为i,则输出的shape为 :math:`(s1, s2, ..., si * rep, ..., sn)` 。输出的数据类型与 `x` 相同。