# Example 1 ip_tensor= torch.randn(4,3,2) print(f"Input Tensor shape:{ip_tensor.shape}\n") op_tensor=torch.movedim(ip_tensor,1,2) print(f"Output Tensor shape:{op_tensor.shape}\n") # Output Input Tensor shape:torch.Size([4, 3, 2]) Output Tensor shape:torch.Size([4, 2, 3])