torch — PyTorch 1.10.1 documentation
pytorch.org › docs › stableAlias of torch.vstack(). scatter. Out-of-place version of torch.Tensor.scatter_() scatter_add. Out-of-place version of torch.Tensor.scatter_add_() split. Splits the tensor into chunks. squeeze. Returns a tensor with all the dimensions of input of size 1 removed. stack. Concatenates a sequence of tensors along a new dimension. swapaxes. Alias ...
python - What's the difference between torch.stack() and ...
https://stackoverflow.com/questions/5430722521.01.2019 · So if A and B are of shape (3, 4), torch.cat ( [A, B], dim=0) will be of shape (6, 4) and torch.stack ( [A, B], dim=0) will be of shape (2, 3, 4). Share Improve this answer answered Jan 22 '19 at 11:31 Jatentaki 9,479 3 37 34 Add a comment 16 t1 = torch.tensor ( [ [1, 2], [3, 4]]) t2 = torch.tensor ( [ [5, 6], [7, 8]])