Exemple #1
0
 def stl(dataset_root, split: str = None):
     dataset = STL10(root=dataset_root,
                     split='unlabeled',
                     transform=amdim_transforms.AMDIMTrainTransformsSTL10(),
                     download=True)
     tng_split, val_split = random_split(dataset, [95000, 5000])
     return tng_split, val_split
 def stl(dataset_root, split: Optional[str] = None):
     if not _TORCHVISION_AVAILABLE:  # pragma: no cover
         raise ModuleNotFoundError(
             'You want to use STL10 dataset loaded from `torchvision` which is not installed yet.'
         )
     dataset = STL10(root=dataset_root,
                     split='unlabeled',
                     transform=amdim_transforms.AMDIMTrainTransformsSTL10(),
                     download=True)
     tng_split, val_split = random_split(dataset, [95000, 5000])
     return tng_split, val_split