import torchvision.datasets as dsets
svhn_transform = transforms.Compose([transforms.ToTensor()])
dataset = dsets.SVHN(root='./data/',
                     split='train',
                     transform=svhn_transform,
                     download=True)
data_loader = torch.utils.data.DataLoader(dataset=dataset,
                                          batch_size=100,
                                          shuffle=True)

I can get SVHN dataset form this code but If I add Resize() like this,
svhn_transform = transforms.Compose([transforms.ToTensor(), transforms.Resize(28)])
but this error occur:. TypeError: img should be PIL Image. Got <class 'torch.Tensor'>
I tried to convert using torchvision.transforms fuctions but failed.
Anyone can help?