You need to permute or transpose the tensor:
import torch
a = torch.randn(1, 128, 56, 128)
print(a.permute(0, 2, 1, 3).shape)
print(a.transpose(2, 1).shape)

torch.Size([1, 56, 128, 128])
torch.Size([1, 56, 128, 128])