Esempio n. 1
0
    def _load_svhn(self, use_extra=False):
        trainset = SVHN(root='.svhn', split='train', download=True,
                           transform=get_transform(32, 4, 20)['train'])
        testset = SVHN(root='.svhn', split='test', download=True,
                       transform=get_transform(32, 4, 20)['test'])
        if not use_extra:
            return {'train': trainset, 'test': testset}

        extraset = SVHN(root='.svhn', split='extra', download=True,
                           transform=get_transform(32, 4, 20)['train'])
        return {'train': trainset + extraset, 'test': testset}
Esempio n. 2
0
 def _load_stl(self):
     trainset = Dataset(STL10(root='.stl',
                              split='train',
                              download=True,
                              transform=get_transform(96, 12, 32,
                                                      True)['train']),
                        with_index=self.with_index)
     testset = STL10(root='.stl',
                     split='test',
                     download=True,
                     transform=get_transform(96, 12, 32, True)['test'])
     return {'train': trainset, 'test': testset}
Esempio n. 3
0
 def _load_cifar100(self):
     trainset = Dataset(CIFAR100(root='.cifar100',
                                 train=True,
                                 download=True,
                                 transform=get_transform(32, 4,
                                                         8)['train']),
                        with_index=self.with_index)
     testset = CIFAR100(root='.cifar100',
                        train=False,
                        download=True,
                        transform=get_transform(32, 4, 8)['test'])
     return {'train': trainset, 'test': testset}
Esempio n. 4
0
 def _load_voc(self):
     trans = get_transform(513, 0, 0, 'voc')
     trainset = VOCSegmentation(root='.voc', image_set='train', download=True,
                             transforms=trans['train'])
     testset = VOCSegmentation(root='.voc', image_set='val', download=True,
                             transforms=trans['test'])
     return {'train': trainset, 'test': testset}
Esempio n. 5
0
 def _load_stl(self):
     trainset = STL10(root='.stl', split='train', download=True,
                        transform=get_transform(96, 12, 32, 'stl')['train'])
     testset = STL10(root='.stl', split='test', download=True,
                     transform=get_transform(96, 12, 32, 'stl')['test'])
     return {'train': trainset, 'test': testset}
Esempio n. 6
0
 def _load_cifar10(self):
     trainset = CIFAR10(root='.cifar10', train=True, download=True,
                        transform=get_transform(32, 4, 16)['train'])
     testset = CIFAR10(root='.cifar10', train=False, download=True,
                       transform=get_transform(32, 4, 16)['test'])
     return {'train': trainset, 'test': testset}