mindspore.ops.ParallelConcat
- class mindspore.ops.ParallelConcat(*args, **kwargs)[source]
Concats tensor in the first dimension.
Concats input tensors along with the first dimension.
Note
The input tensors are all required to have size 1 in the first dimension.
- Inputs:
values (tuple, list) - A tuple or a list of input tensors. The data type and shape of these tensors must be the same.
- Outputs:
Tensor, data type is the same as values.
- Raises
ValueError – If length of shape of values is less than 1.
- Supported Platforms:
Ascend
Examples
>>> data1 = Tensor(np.array([[0, 1]]).astype(np.int32)) >>> data2 = Tensor(np.array([[2, 1]]).astype(np.int32)) >>> op = ops.ParallelConcat() >>> output = op((data1, data2)) >>> print(output) [[0 1] [2 1]]