forked from huawei/mindspore2022
16 lines
664 B
ReStructuredText
16 lines
664 B
ReStructuredText
mindspore.ops.repeat_elements
|
||
===============================
|
||
|
||
.. py:function:: mindspore.ops.repeat_elements(x, rep, axis=0)
|
||
|
||
根据指定轴复制输入Tensor的元素,类似np.repeat的功能。
|
||
|
||
**参数:**
|
||
|
||
- **x** (Tensor) - 输入Tensor。类型为float16、float32、int8、uint8、int16、int32或int64。
|
||
- **rep** (int) - 指定复制次数,为正数。
|
||
- **axis** (int) - 指定复制轴,默认为0。
|
||
|
||
**输出:**
|
||
|
||
Tensor,值沿指定轴复制。如果 `x` 的shape为 :math:`(s1, s2, ..., sn)` ,轴为i,则输出的shape为 :math:`(s1, s2, ..., si * rep, ..., sn)` 。输出的数据类型与 `x` 相同。 |