img = torch.arange(1 * 2 * 2 * 3).reshape(1, 2, 2, 3) # N=1, H=2, W=2, C=3 print(img.permute(0, 3, 1, 2).shape) # torch.Size([1, 3, 2, 2]) ✅ print(img.reshape(1, 3, 2, 2).shape) # torch.Size([1, 3, 2, 2]) ⚠️ same shape!