class mydataset(data.Dataset):
    def __init__(self,root,transforms=None):
        ...
        transforms = T.Compose([
                    T.Resize ((224,224)),
                    T.ToTensor(),
                    T.Normalize(mean = [0.485, 0.456, 0.406], 
                                     std = [0.229, 0.224, 0.225])
                    ]) 
    def __getitem__(self,index):
        ...
        data = self.transforms(data)
        return data, label