Question 1
You have a tensor x = torch.tensor([1, 2, 3, 4]).
You perform
stacked_x_dim0 = torch.stack([x, x, x], dim=0)And
stacked_x_dim1 = torch.stack([x, x, x], dim=1)What will be the shapes of stacked_x_dim0 and stacked_x_dim1 respectively?
stacked_x_dim0: [3, 3], stacked_x_dim1: [4, 4]
stacked_x_dim0: [4, 3], stacked_x_dim1: [3, 4]
stacked_x_dim0: [3, 4], stacked_x_dim1: [4, 3]
stacked_x_dim0: [4, 4], stacked_x_dim1: [3, 3]