Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

fix broken Python IO API docs #12871

Merged
merged 1 commit into from
Oct 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions docs/api/python/io/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Overview

This document summarizes supported data formats and iterator APIs to read the
data including
data including:

```eval_rst
.. autosummary::
Expand Down Expand Up @@ -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::
Expand All @@ -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::
Expand All @@ -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``
Expand Down Expand Up @@ -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,
Expand All @@ -151,10 +150,35 @@ The backend engine will recognize the index of `N` in the `layout` as the axis f

<script type="text/javascript" src='../../../_static/js/auto_module_index.js'></script>

### 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

```

<script>auto_index("api-reference");</script>
4 changes: 2 additions & 2 deletions python/mxnet/io/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,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)
Expand Down