mxnet.gluon.data.Dataset¶
-
class
mxnet.gluon.data.
Dataset
[source]¶ Abstract dataset class. All datasets should have this interface.
Subclasses need to override __getitem__, which returns the i-th element, and __len__, which returns the total number elements.
Note
An mxnet or numpy array can be directly used as a dataset.
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
Methods
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.
-