How to append to a tensor in a loop - PyTorch Forums
https://discuss.pytorch.org/t/how-to-append-to-a-tensor-in-a-loop/13555931.10.2021 · thecho7 (Suho Cho) November 1, 2021, 12:53am #2 You can concatenate the tensors along the specific dimension. Your question can be briefly expressed like below, a = torch.Size (1, 3, 7) b = torch.Size (1, 3, 7) result = torch.cat ( (a, b), dim=1) Then, you can get the result tensor size of (1, 6, 7) The sample code