def get_dataset(options): # Choose the embedding network if options.dataset == 'miniImageNet': from data.mini_imagenet import MiniImageNet, FewShotDataloader dataset_train = MiniImageNet( phase='trainval' ) ## change it to train only, this is including the validation set dataset_val = MiniImageNet(phase='test') data_loader = FewShotDataloader elif options.dataset == 'tieredImageNet': from data.tiered_imagenet import tieredImageNet, FewShotDataloader dataset_train = tieredImageNet(phase='train') dataset_val = tieredImageNet(phase='test') data_loader = FewShotDataloader elif options.dataset == 'CIFAR_FS': from data.CIFAR_FS import CIFAR_FS, FewShotDataloader dataset_train = CIFAR_FS(phase='train') dataset_val = CIFAR_FS(phase='test') data_loader = FewShotDataloader else: print("Cannot recognize the dataset type") assert (False) return (dataset_train, dataset_val, data_loader)
def get_dataset(options): # Choose the embedding network if options.dataset == 'miniImageNet': from data.mini_imagenet import MiniImageNet, FewShotDataloader dataset_train = MiniImageNet(phase='train') dataset_val = MiniImageNet(phase='val') data_loader = FewShotDataloader elif options.dataset == 'tieredImageNet': from data.tiered_imagenet import tieredImageNet, FewShotDataloader dataset_train = tieredImageNet(phase='train') dataset_val = tieredImageNet(phase='val') data_loader = FewShotDataloader elif options.dataset == 'CIFAR_FS': from data.CIFAR_FS import CIFAR_FS, FewShotDataloader dataset_train = CIFAR_FS(phase='train') dataset_val = CIFAR_FS(phase='val') data_loader = FewShotDataloader elif options.dataset == 'FC100': from data.FC100 import FC100, FewShotDataloader dataset_train = FC100(phase='train') dataset_val = FC100(phase='val') data_loader = FewShotDataloader else: print("Cannot recognize the dataset type") assert (False) return (dataset_train, dataset_val, data_loader)
def get_dataset(options): # return (dataset_train, dataset_val, data_loader) # Choose the dataset if options.dataset == 'miniImageNet': from data.mini_imagenet import MiniImageNet, FewShotDataloader dataset_train = MiniImageNet(options, phase='train') dataset_val = MiniImageNet(options, phase='val') data_loader = FewShotDataloader elif options.dataset == 'CIFAR_FS': from data.CIFAR_FS import CIFAR_FS, FewShotDataloader dataset_train = CIFAR_FS(options, phase='train') dataset_val = CIFAR_FS(options, phase='val') data_loader = FewShotDataloader else: print("Cannot recognize the dataset type!") assert (False) return (dataset_train, dataset_val, data_loader)
def get_dataset(options): # Choose the embedding network if options.dataset == 'miniImageNet': from data.mini_imagenet import MiniImageNet, FewShotDataloader dataset_test = MiniImageNet(options, phase='test') data_loader = FewShotDataloader elif options.dataset == 'CIFAR_FS': from data.CIFAR_FS import CIFAR_FS, FewShotDataloader dataset_test = CIFAR_FS(options, phase='test') data_loader = FewShotDataloader else: print("Cannot recognize the dataset type") assert (False) return (dataset_test, data_loader)