【发布时间】:2019-10-23 12:58:29
【问题描述】:
我正在使用 tensorflow_datasets (tfds doc) 加载 CIFAR-100
train, test = tfds.load(name="cifar100:3.*.*", split=["train", "test"], as_supervised=True)
CIFAR-100 既有标签(100 类)也有粗略标签(20 类),如上面链接的文档中所示。访问标签很容易,例如:
for image, label in train:
# ... the label here is the actual label, not the coarse_label
但是,我计划基于粗略标签进行操作,例如,通过它进行过滤或将其用作 Keras 分类器中的标签。
如何访问粗略标签?
【问题讨论】:
标签: python tensorflow keras tensorflow-datasets