예제 #1
0
 def info(self) -> base.DatasetInfo:
   if self._label_key:
     label_feature = self._dataset_builder.info.features[self._label_key]
     return base.DatasetInfo(num_classes=label_feature.num_classes)
   else:
     return base.DatasetInfo(num_classes=None)
예제 #2
0
 def info(self) -> base.DatasetInfo:
     return base.DatasetInfo(num_classes=2)
예제 #3
0
 def info(self) -> base.DatasetInfo:
   return base.DatasetInfo(num_classes=super().info.num_classes,
                           appearing_classes=_IMAGENET_R_LABELSET)