Does the cifar100 dataset of pytorch provide coarse labels?


(Wu Xiaodong) #1

A quick question here about cifar100

I am wondering if the cifar100 dataset of pytorch provide a way to get the coarse labels or if there is 3rd implemented codes to realize this.

I have refered to the manual of torchvision.datasets.CIFAR100, there seems to be no description about coarse labels.

Thanks in advance

----------------update-------------------
No such option in torchvision.datasets.CIFAR100
Solved by adding an option parameter to the code of https://github.com/pytorch/vision/blob/master/torchvision/datasets/cifar.py
See the modified code at https://github.com/xiaodongww/pytorch/blob/master/cifarDataset.py


(Simon Wang) #2

I’m not sure, but it should be easy to implement a map from https://www.cs.toronto.edu/~kriz/cifar.html.


(Wu Xiaodong) #4

Thanks for your quick reply.
I have just check the source code and there is no such option.

Just handled this by simply modifying the source code a little by adding a coarse_labels key.