Ejemplo n.º 1
0
def _get_cub200_dataset(root, train_transformation, eval_transformation):
    train_set = CUB200(root, train=True)
    test_set = CUB200(root, train=False)

    return train_eval_avalanche_datasets(train_set, test_set,
                                         train_transformation,
                                         eval_transformation)
Ejemplo n.º 2
0
def _get_fmnist_dataset(train_transformation, eval_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_eval_avalanche_datasets(
        train_set, test_set, train_transformation, eval_transformation)
Ejemplo n.º 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_eval_avalanche_datasets(train_set, test_set,
                                         train_transformation,
                                         test_transformation)
Ejemplo n.º 4
0
def _get_tiny_imagenet_dataset(train_transformation, test_transformation):
    train_set = TinyImagenet(train=True)

    test_set = TinyImagenet(train=False)

    return train_eval_avalanche_datasets(train_set, test_set,
                                         train_transformation,
                                         test_transformation)
Ejemplo n.º 5
0
def _get_cifar10_dataset(train_transformation, eval_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_eval_avalanche_datasets(
        train_set, test_set, train_transformation, eval_transformation)
Ejemplo n.º 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_eval_avalanche_datasets(
                                    train_dataset=train,
                                    test_dataset=test,
                                    train_transformation=train_transformation,
                                    eval_transformation=test_transform)
Ejemplo n.º 7
0
def _get_mnist_dataset(train_transformation, test_transformation):
    train_set = MNIST(root=expanduser("~") + "/.avalanche/data/mnist/",
                      train=True,
                      download=True)

    test_set = MNIST(root=expanduser("~") + "/.avalanche/data/mnist/",
                     train=False,
                     download=True)

    return train_eval_avalanche_datasets(train_set, test_set,
                                         train_transformation,
                                         test_transformation)
Ejemplo n.º 8
0
def _get_mnist_dataset():
    train_set = MNIST(root=expanduser("~") + "/.avalanche/data/mnist/",
                      train=True,
                      download=True)

    test_set = MNIST(root=expanduser("~") + "/.avalanche/data/mnist/",
                     train=False,
                     download=True)

    return train_eval_avalanche_datasets(
        train_set,
        test_set,
        None,
        None,
        dataset_type=AvalancheDatasetType.CLASSIFICATION)