模型开发接口
推理部署接口
API 相关说明
Repeat elements of an array.
inp (Tensor) – input tensor.
Tensor
repeats (int) – the number of repetitions for each element.
int
axis (Optional[int]) – the axis along which to repeat values. By default, use the flattened input array, and return a flat output array.
Optional
output tensor.
Examples
>>> import numpy as np >>> x = Tensor([[1, 2], [3, 4]], np.int32) >>> F.repeat(x, 2, axis=0) Tensor([[1 2] [1 2] [3 4] [3 4]], dtype=int32, device=xpux:0)
previous
megengine.functional.tile
next
megengine.functional.roll