The below piece of code gives me back really weird data augmented image. There are no other transformations besides the Resize. I am using pytorch 0.40

transformed_dataset = data_sets(csv_path=csv_path,
                                image_path = image_path,
                                transform = transforms.Compose([
                                    transforms.Resize(256),
                                    transforms.ToTensor(),
                                    
                                ]) )

dataloader = DataLoader(transformed_dataset, batch_size=2,
                        shuffle=True, num_workers=0)

for idx, _ in enumerate(dataloader):
    #print(_['input'].size())
    for _ in _['input']:
        img = _.view(256, 256, 3).numpy()
        
        plt.imshow(img)

I am really not familiar with matplotlib so maybe this is the default behavior?