I have a tensor of size (2, b, h) and I want to change it to the following size: (b, 2*h), where the corresponding lists are concatenated, for example:
a = torch.tensor([[[1, 2, 3], [4, 5, 6], [4, 4, 4]],
[[4, 5, 6], [7, 8, 9], [5, 5, 5]]])
I want:
b = tensor([[1, 2, 3, 4, 5, 6],
[4, 5, 6, 7, 8, 9],
[4, 4, 4, 5, 5, 5]])