I have this code and I spent a lot of time figuring out why the size is still the same [28,28]:
class FashionDataset(Dataset):
    def __init__(self,dataset_dir,train_option,transform=None):
        self.dataset = datasets.FashionMNIST(root=dataset_dir,
                                           train=train_option,
                                           download=True)
        self.transform = transform
        self.labels = self.dataset.targets
        
    def __len__(self):
        return len(self.dataset)

    def __getitem__(self, index):
        data, target = self.dataset[index]
        data = self.transform(data)
        return index, data, target

transform = transforms.Compose([transforms.ToTensor(),transforms.Resize((224, 224))])

train_dataset = FashionDataset(dataset_dir = dataset_dir, train_option = True, transform = transform)

test_dataset = FashionDataset(dataset_dir = dataset_dir, train_option = False, transform = transform)

train_loader = DataLoader(train_dataset, 
                          batch_size=batch_size,
                          sampler=SubsetRandomSampler(range(len(train_dataset))))

test_loader = DataLoader(test_dataset, 
                         batch_size=batch_size, 
                         shuffle=False)

Thank you for your help in advance.