Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load and parse metadata for CIFAR-10, CIFAR-100 #502

Merged
merged 1 commit into from
May 17, 2018

Conversation

xenosoz
Copy link
Contributor

@xenosoz xenosoz commented May 16, 2018

As CIFAR-* image labels are encoded numerically, it would be helpful to have string labels for human readers. It's good to know CIFAR archive has metadata for that.

For example, in Pytorch blitz tutorial, we might rewrite the following code:

classes = ('plane', 'car', 'bird', 'cat',
'deer', 'dog', 'frog', 'horse', 'ship', 'truck')

as:

classes = trainset.meta['label_names']

and we can extend CIFAR-10 to CIFAR-100 easily with:

classes = trainset.meta['fine_label_names']
classes = trainset.meta['coarse_label_names']

* cifar10.meta['label_names']

* cifar100.meta['fine_label_names']

* cifar100.meta['coarse_label_names']
@soumith soumith merged commit 972b80c into pytorch:master May 17, 2018
@soumith
Copy link
Member

soumith commented May 17, 2018

thank you!

soumith added a commit that referenced this pull request May 17, 2018
soumith added a commit that referenced this pull request May 17, 2018
varunagrawal pushed a commit to varunagrawal/vision that referenced this pull request Jul 23, 2018
* cifar10.meta['label_names']

* cifar100.meta['fine_label_names']

* cifar100.meta['coarse_label_names']
varunagrawal pushed a commit to varunagrawal/vision that referenced this pull request Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants