abstract class MXNet::Gluon::Data::Dataset(T)
- MXNet::Gluon::Data::Dataset(T)
- Reference
- Object
Overview
Abstract dataset.
All datasets should implement this interface.
Dataset
includes Indexable
, so subclasses must define
#size
, which returns the total number elements, and
#unsafe_fetch
, which returns the indexed element.
Included Modules
- Indexable(T)
Direct Known Subclasses
- MXNet::Gluon::Data::DownloadedDataset(T, U, V)
- MXNet::Gluon::Data::LazyTransformDataset(T, U)
- MXNet::Gluon::Data::SimpleDataset(T)
Defined in:
mxnet/gluon/data/dataset.crInstance Method Summary
-
#size
Returns the number of elements in this container.
-
#transform(lazy = true, &proc : T -> U) forall U
Returns a new dataset with each sample transformed by the supplied transformer block.
- #unsafe_fetch(idx)
Instance Method Detail
abstract
def size
#
Description copied from module Indexable(T)
Returns the number of elements in this container.
def transform(lazy = true, &proc : T -> U) forall U
#
Returns a new dataset with each sample transformed by the supplied transformer block.
Parameters
- lazy (
Bool
, default =true
) Iffalse
, transforms all samples at once. Otherwise, transforms each sample on demand. Note that if the transformer block is stochastic, you must setlazy
totrue
or you will get the same result on all epochs.