Example #1
0
def _get_cub200_dataset(root, train_transformation, test_transformation):
    train_set = CUB200(root, train=True)
    test_set = CUB200(root, train=False)

    return train_test_transformation_datasets(train_set, test_set,
                                              train_transformation,
                                              test_transformation)
def _get_tiny_imagenet_dataset(train_transformation, test_transformation):
    train_set = TinyImagenet(train=True)

    test_set = TinyImagenet(train=False)

    return train_test_transformation_datasets(train_set, test_set,
                                              train_transformation,
                                              test_transformation)
Example #3
0
def _get_imagenet_dataset(root, train_transformation, test_transformation):
    train_set = ImageNet(root, split="train")

    test_set = ImageNet(root, split="val")

    return train_test_transformation_datasets(train_set, test_set,
                                              train_transformation,
                                              test_transformation)
Example #4
0
def _get_mini_imagenet_dataset(path, train_transformation, test_transformation):
    """ Create from ImageNet. """
    task_labels = None
    train_set = MiniImageNetDataset(path, split='train')
    test_set = MiniImageNetDataset(path, split='test')

    tr_ret, test_ret = train_test_transformation_datasets(
        train_set, test_set, train_transformation, test_transformation)
    return tr_ret, test_ret, task_labels
Example #5
0
def _get_mini_imagenet_dataset_preprocessed(path, train_transformation, test_transformation):
    """
    Use preprocessed train/val/test split.
    Download: https://github.com/yaoyao-liu/mini-imagenet-tools
    """
    train_set, test_set, task_labels = get_split_mini_imagenet(path)

    return train_test_transformation_datasets(
        train_set, test_set, train_transformation, test_transformation), task_labels
Example #6
0
def _get_omniglot_dataset(train_transformation, test_transform):
    train = Omniglot(root=expanduser("~") + "/.avalanche/data/omniglot/",
                     train=True, download=True)
    test = Omniglot(root=expanduser("~") + "/.avalanche/data/omniglot/",
                    train=False, download=True)

    return train_test_transformation_datasets(
                                    train_dataset=train,
                                    test_dataset=test,
                                    train_transformation=train_transformation,
                                    test_transformation=test_transform)
def _get_fmnist_dataset(train_transformation, test_transformation):
    train_set = FashionMNIST(expanduser("~") +
                             "/.avalanche/data/fashionmnist/",
                             train=True,
                             download=True)
    test_set = FashionMNIST(expanduser("~") + "/.avalanche/data/fashionmnist/",
                            train=False,
                            download=True)
    return train_test_transformation_datasets(train_set, test_set,
                                              train_transformation,
                                              test_transformation)
Example #8
0
def _get_cifar10_dataset(train_transformation, test_transformation):
    train_set = CIFAR10(expanduser("~") + "/.avalanche/data/cifar10/",
                        train=True,
                        download=True)

    test_set = CIFAR10(expanduser("~") + "/.avalanche/data/cifar10/",
                       train=False,
                       download=True)

    return train_test_transformation_datasets(train_set, test_set,
                                              train_transformation,
                                              test_transformation)