diff --git a/docs/api/python/io/io.md b/docs/api/python/io/io.md index 6980834835b2..8e7330aa6f9e 100644 --- a/docs/api/python/io/io.md +++ b/docs/api/python/io/io.md @@ -3,7 +3,7 @@ ## Overview This document summarizes supported data formats and iterator APIs to read the -data including +data including: ```eval_rst .. autosummary:: @@ -68,8 +68,7 @@ A detailed tutorial is available at ## Helper classes and functions - -Data structures and other iterators provided in the ``mxnet.io`` packages. +### Data structures and other iterators ```eval_rst .. autosummary:: @@ -83,7 +82,7 @@ Data structures and other iterators provided in the ``mxnet.io`` packages. io.MXDataIter ``` -Functions to read and write RecordIO files. +### Functions to read and write RecordIO files ```eval_rst .. autosummary:: @@ -95,7 +94,7 @@ Functions to read and write RecordIO files. recordio.pack_img ``` -## Develop a new iterator +## How to develop a new iterator Writing a new data iterator in Python is straightforward. Most MXNet training/inference programs accept an iterable object with ``provide_data`` @@ -133,7 +132,7 @@ Parsing and performing another pre-processing such as augmentation may be expens If performance is critical, we can implement a data iterator in C++. Refer to [src/io](https://github.com/dmlc/mxnet/tree/master/src/io) for examples. -### Change batch layout +### How to change the batch layout By default, the backend engine treats the first dimension of each data and label variable in data iterators as the batch size (i.e. `NCHW` or `NT` layout). In order to override the axis for batch size, @@ -151,10 +150,35 @@ The backend engine will recognize the index of `N` in the `layout` as the axis f +### mxnet.io - Data Iterators + ```eval_rst .. automodule:: mxnet.io - :members: + :members: NDArrayIter, CSVIter, LibSVMIter, ImageRecordIter, ImageRecordUInt8Iter, MNISTIter +``` + +### mxnet.io - Helper Classes & Functions + +```eval_rst +.. automodule:: mxnet.io + :members: DataBatch, DataDesc, DataIter, MXDataIter, PrefetchingIter, ResizeIter + +``` + +### mxnet.recordio + +```eval_rst +.. currentmodule:: mxnet.recordio + .. automodule:: mxnet.recordio :members: + ``` + +```eval_rst +.. _name: mxnet.symbol.Symbol.name +.. _shape: mxnet.ndarray.NDArray.shape + +``` + diff --git a/python/mxnet/io.py b/python/mxnet/io.py index 884e9294741a..e390d7c473f7 100644 --- a/python/mxnet/io.py +++ b/python/mxnet/io.py @@ -106,8 +106,8 @@ def get_list(shapes, types): Parameters ---------- - shapes : a tuple of (name, shape) - types : a tuple of (name, type) + shapes : a tuple of (name_, shape_) + types : a tuple of (name_, np.dtype) """ if types is not None: type_dict = dict(types)