stack

dragon.vm.torch.stack(
  seq,
  dim=0,
  out=None
)[source]

Stack the inputs along the given dimension.

Parameters:
  • seq (sequence of dragon.vm.torch.Tensor) – The sequence.
  • dim (int, optional, default=0) – The dim to stack.
  • out (dragon.vm.torch.Tensor, optional) – The optional output tensor.
Returns:

dragon.vm.torch.Tensor – The output tensor.