Solved by b02202050 in post #2 
              
              
                For example, 
x = torch.rand(2,3,4,5) # now x.shape is torch.Size([2, 3, 4, 5])
y = x.permute(0,3,1,2) # now y.shape is torch.Size([2, 5, 3, 4])
    # which means: take the x's dimension 0,3,1,2 to be y's dimension 0,1,2,3
    # i.e. x's dimension 0 is 2; dimension 1 is 3; dimension 2 is 4; dimensio…