import torch
from PIL import Image
from torchvision import transforms

img = Image.open(filename)
print(img.size)
content_transform = transforms.Compose([
        transforms.ToTensor(),
        transforms.Lambda(lambda x: x.mul(255))
    ])

content_image = content_transform(content_image)
print(content_image.shape)

When i load an image using PIL and appply ToTensor() transform on it, the tensor rotates 90degrees Clockwise
img.size: (2592,1944)
content_image.shape: torch.Size([3,1994,2592])

Any idea why is this happening or how can i fix this?
Thanks in advance