This is how I loaded my dataset. The shape of each batch while loading is (32, 3, 218, 178)
temp_dataset = ImageFolder('./rude_dir', transforms.Compose([ transforms.ToTensor() ]))
temp_loader = DataLoader(dataset=temp_dataset, batch_size=batch_size, shuffle=True, num_workers=8, drop_last=True)

temp_dataset = ImageFolder('./rude_dir', transforms.Compose([ transforms.ToTensor() ]))
temp_loader = DataLoader(dataset=temp_dataset, batch_size=batch_size, shuffle=True, num_workers=8, drop_last=True)

a[0].shape
torch.Size([32, 3, 218, 178])

How to reshape these images by just modifying the transforms function ?
transformations_exp = transforms.Compose([
    transforms.Resize(128),
    transforms.ToTensor(),
    transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])
temp_dataset = ImageFolder('./rude_dir', transformations_exp)
temp_loader = DataLoader(dataset=temp_dataset, batch_size=batch_size, shuffle=True, num_workers=8, drop_last=True)
for a in temp_loader:
    break
a[0].shape
torch.Size([32, 3, 156, 128])

As you can see, when I specify transforms.Resize(128), only one dimension changes to 128 and another dimension changes to some other value.
Thank you so much in advance !