observations.cifar100

cifar100(
    path,
    label_mode='fine'
)

Load the CIFAR-100 data set (Krizhevsky & Hinton, 2009). It consists of 32x32 RGB images in 100 classes, with 600 images per class. There are 500 training images and 100 testing images per class.

Args:

  • path: str. Path to directory which either stores file or otherwise file will be downloaded and extracted there. Filename is cifar-100-python/.
  • label_mode: str. 'fine' (class to which image belongs) or 'coarse' (superclass to which image belongs).

Returns:

Tuple of np.ndarray's (x_train, y_train), (x_test, y_test).

Krizhevsky, A., & Hinton, G. (2009). Learning multiple layers of features from tiny images.