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