mxnet.io.DataIter¶
-
class
mxnet.io.
DataIter
(batch_size=0)[source]¶ The base class for an MXNet data iterator.
All I/O in MXNet is handled by specializations of this class. Data iterators in MXNet are similar to standard-iterators in Python. On each call to next they return a DataBatch which represents the next batch of data. When there is no more data to return, it raises a StopIteration exception.
- Parameters
batch_size (int, optional) – The batch size, namely the number of items in the batch.
See also
NDArrayIter
Data-iterator for MXNet NDArray or numpy-ndarray objects.
CSVIter
Data-iterator for csv data.
LibSVMIter
Data-iterator for libsvm data.
ImageIter
Data-iterator for images.
Methods
__init__
([batch_size])Initialize self.
getdata
()Get data of current batch.
getindex
()Get index of the current batch.
getlabel
()Get label of the current batch.
getpad
()Get the number of padding examples in the current batch.
iter_next
()Move to the next batch.
next
()Get next data batch from iterator.
reset
()Reset the iterator to the begin of the data.