Table Of Contents
Table Of Contents

mxnet.gluon.data.vision.datasets.CIFAR10

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

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

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

Parameters
  • root (str, default $MXNET_HOME/datasets/cifar10) – Path to temp folder for storing data.

  • 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:

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

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

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

Methods

__init__([root, 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.