Table Of Contents
Table Of Contents

CIFAR100

class mxnet.gluon.data.vision.datasets.CIFAR100(root='/var/lib/jenkins/.mxnet/datasets/cifar100', fine_label=False, train=True, transform=None)[source]

CIFAR100 image classification dataset from https://www.cs.toronto.edu/~kriz/cifar.html

Each sample is an image (in 3D NDArray) with shape (32, 32, 1).

Parameters:
  • root (str, default $MXNET_HOME/datasets/cifar100) – Path to temp folder for storing data.
  • fine_label (bool, default False) – Whether to load the fine-grained (100 classes) or coarse-grained (20 super-classes) labels.
  • train (bool, default True) – Whether to load the training or testing set.
  • transform (function, default None) – A user defined callback that transforms each sample. For example:

:param ::: transform=lambda data, label: (data.astype(np.float32)/255, label)

__init__(root='/var/lib/jenkins/.mxnet/datasets/cifar100', fine_label=False, train=True, transform=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([root, fine_label, train, transform]) Initialize self.
transform(fn[, lazy]) Returns a new dataset with each sample transformed by the transformer function fn.
transform_first(fn[, lazy]) Returns a new dataset with the first element of each sample transformed by the transformer function fn.