Solved by ptrblck in post #4 
              
              
                Sorry for the typo, but apparently autocorrect “corrected” permute to permit.  
Could you .permute the dimensions, since view will not yield the desired results: 
x = torch.arange(2*3*4).view(2, 3, 4)
y = x.view(2, 4, 3)
z = x.permute(0, 2, 1)

print(x)
> tensor([[[ 0,  1,  2,  3],
         [ 4,  5,…