def get_data(dataset, data_type=None): if dataset == 'Omniglot': return omniglot.OmniglotData(path='../data/omniglot.npy', train_size=1100, validation_size=100, augment_data=True, seed=111) elif dataset == 'miniImageNet': return mini_imagenet.MiniImageNetData(path='../data', seed=42) elif dataset == 'shapenet': return shapenet.ShapeNetData(path='../data', model_type=data_type, train_fraction=0.7, val_fraction=0.1, num_instances_per_item=36, seed=42) else: sys.exit("Unsupported dataset type (%s)." % dataset)
def get_data(dataset, mode='train', seed=1): if dataset == 'Omniglot': return omniglot.OmniglotData(path='../data/omniglot.npy', train_size=1100, validation_size=100, augment_data=True, seed=seed) elif dataset == 'miniImageNet': return mini_imagenet.MiniImageNetData(path='../data', seed=seed) elif dataset == 'cifarfs': return cifar_fs.CifarData(path='../data', seed=seed) elif dataset == 'tieredImageNet': return tiered_imagenet.tieredImageNetData(path='../data', seed=seed) else: sys.exit("Unsupported dataset type (%s)." % dataset)