Table Of Contents
Table Of Contents


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

Data-iterator for MXNet NDArray or numpy-ndarray objects.
Data-iterator for csv data.
Data-iterator for libsvm data.
Data-iterator for images.

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


__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.