def tinyimagenet(args): data = TinyImageNet transform_train, transform_test = dstransforms[args.dataset](args) root = '/ssd/tinyimagenet' if args.dataset_path is None else args.dataset_path trainset = data(root=root, transform=transform_train) valset = data(root=root, transform=transform_test, train=False) return trainset, valset
def imagenet_hdf5(args): data = ImageNetHDF5 transform_train, transform_test = dstransforms[args.dataset](args) root = '/ssd/ILSVRC2012' if args.dataset_path is None else args.dataset_path trainset = data(root=f'{root}/train', transform=transform_train) testset = data(root=f'{root}/val', transform=transform_test) return trainset, testset
def fashion(args): data = FashionMNIST transform_train, transform_test = dstransforms[args.dataset](args) root = './data/fashion' root = args.dataset_path if args.dataset_path is not None else root trainset = data(root=root, train=True, download=True, transform=transform_train) valset = data(root=root, train=False, download=True, transform=transform_test) return trainset, valset
def imagenet_a(args): data = ImageFolder transform = dstransforms[args.dataset](args) root = args.dataset_path testset = data(root=f'{root}/', transform=transform) return None, None, testset