Skip to content

Instantly share code, notes, and snippets.

@keisukefukuda
Last active May 23, 2019 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keisukefukuda/82ba63a1aa91ecc8e34a73f143529d98 to your computer and use it in GitHub Desktop.
Save keisukefukuda/82ba63a1aa91ecc8e34a73f143529d98 to your computer and use it in GitHub Desktop.
dataset_info = {
'cifar10': {'class_lables': 10, load_func: get_cifar10},
'cifar100': {'class_lables': 100, load_func: get_cifar100},
}
if args.dataset not in dataset_info:
raise RuntimeError('Invalid dataset choice.')
class_labels = dataset_info[args.dataset]['class_labels']
if comm.rank == 0:
train, test = dataset_info[args.dataset]['load_func']()
else:
train, test = None, None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment