You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2018/10/24 23:25:01 UTC

[incubator-mxnet] branch master updated: fix broken docs (#12871)

This is an automated email from the ASF dual-hosted git repository.

zhreshold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 50028e9  fix broken docs (#12871)
50028e9 is described below

commit 50028e9586a56a3902837daf24fc5e0e9a90bacf
Author: Aaron Markham <ma...@amazon.com>
AuthorDate: Wed Oct 24 16:24:48 2018 -0700

    fix broken docs (#12871)
---
 docs/api/python/io/io.md | 38 +++++++++++++++++++++++++++++++-------
 python/mxnet/io/io.py    |  4 ++--
 2 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/docs/api/python/io/io.md b/docs/api/python/io/io.md
index 6980834..8e7330a 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
 
 <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>
diff --git a/python/mxnet/io/io.py b/python/mxnet/io/io.py
index 20da2ea..6cd0c83 100644
--- a/python/mxnet/io/io.py
+++ b/python/mxnet/io/io.py
@@ -102,8 +102,8 @@ class DataDesc(namedtuple('DataDesc', ['name', 'shape'])):
 
         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)