dstack(tensors) → Tensor¶
Stack tensors in
tensorsdepthwish (along third axis).
This is equivalent to concatenation tensors in
tensorsalong the third axis after 1-D and 2-D tensors have been reshaped by
The documentation is referenced from: https://pytorch.org/docs/1.10/generated/torch.dstack.html.
tensors – (List[oneflow.Tensor]): sequence of tensors to stack
>>> import oneflow as flow >>> x1 = flow.randn(2, 3, 4) >>> x2 = flow.randn(2, 3, 2) >>> flow.dstack([x1, x2]).shape oneflow.Size([2, 3, 6]) >>> x = flow.randn(6, 4) >>> flow.dstack([x, x]).shape oneflow.Size([6, 4, 2])