Probably is a stupid question, but searching in the net leads to many similar problems, that do not solve this problem.
Basically I have two tensors from 2 different lists:
a = torch.tensor([1, 2, 3])
b = torch.tensor([4, 5, 6])
c = torch.stack([a, b])
Now… I want a tensor with this shape:
print(c)
tensor([[1, 4],
[2, 5],
[3, 6]])
but using reshape
, view
or whatever, I get only the following tensor:
tensor([[1, 2],
[3, 4],
[5, 6]])
which is definitely not what I want.
What should i do?
Thanks