mxnet.gluon.data.vision.datasets.FashionMNIST¶
-
class
mxnet.gluon.data.vision.datasets.
FashionMNIST
(root='/var/lib/jenkins/.mxnet/datasets/fashion-mnist', train=True, transform=None)[source]¶ A dataset of Zalando’s article images consisting of fashion products, a drop-in replacement of the original MNIST dataset from https://github.com/zalandoresearch/fashion-mnist
Each sample is an image (in 3D NDArray) with shape (28, 28, 1).
- Parameters
root (str, default $MXNET_HOME/datasets/fashion-mnist') – 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/fashion-mnist', 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.