megengine.functional.concat¶
- concat(inps, axis=0, device=None)[source]¶
Concat some tensors
- Parameters
- Return type
- Returns
output tensor.
Examples
>>> import numpy as np >>> data1 = Tensor(np.arange(0, 6, dtype=np.float32).reshape((2, 3))) >>> data2 = Tensor(np.arange(6, 12, dtype=np.float32).reshape((2, 3))) >>> out = F.concat([data1, data2]) >>> out.numpy() array([[ 0., 1., 2.], [ 3., 4., 5.], [ 6., 7., 8.], [ 9., 10., 11.]], dtype=float32)