You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/09/04 18:37:48 UTC

[GitHub] indhub closed pull request #12323: Sphinx error reduction

indhub closed pull request #12323: Sphinx error reduction
URL: https://github.com/apache/incubator-mxnet/pull/12323
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/api/clojure/index.md b/docs/api/clojure/index.md
index 3eeffff0a4e..32abbe06ad7 100644
--- a/docs/api/clojure/index.md
+++ b/docs/api/clojure/index.md
@@ -1,9 +1,20 @@
 # MXNet - Clojure API
+
 MXNet supports the Clojure programming language. The MXNet Clojure package brings flexible and efficient GPU
 computing and state-of-art deep learning to Clojure. It enables you to write seamless tensor/matrix computation with multiple GPUs in Clojure. It also lets you construct and customize the state-of-art deep learning models in Clojure, and apply them to tasks, such as image classification and data science challenges.
 
 See the [MXNet Clojure API Documentation](docs/index.html) for detailed API information.
 
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   kvstore.md
+   module.md
+   ndarray.md
+   symbol_in_pictures.md
+   symbol.md
+```
 
 ## Tensor and Matrix Computations
 You can perform tensor or matrix computation in pure Clojure:
diff --git a/docs/api/index.md b/docs/api/index.md
new file mode 100644
index 00000000000..eff6807678e
--- /dev/null
+++ b/docs/api/index.md
@@ -0,0 +1,14 @@
+# MXNet APIs
+
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   c++/index.md
+   clojure/index.md
+   julia/index.md
+   perl/index.md
+   python/index.md
+   r/index.md
+   scala/index.md
+```
diff --git a/docs/api/python/index.md b/docs/api/python/index.md
index 420f4c9b72f..42c4af9e46b 100644
--- a/docs/api/python/index.md
+++ b/docs/api/python/index.md
@@ -17,58 +17,41 @@ Code examples are placed throughout the API documentation and these can be run a
 ```eval_rst
 
 .. note:: A convenient way to execute code examples is using the ``%doctest_mode`` mode of
-    Jupyter notebook, which allows for pasting multi-line examples containing
-    ``>>>`` while preserving indentation. Run ``%doctest_mode?`` in Jupyter notebook
-    for more details.
+   Jupyter notebook, which allows for pasting multi-line examples containing
+   ``>>>`` while preserving indentation. Run ``%doctest_mode?`` in Jupyter notebook
+   for more details.
 
 ```
 
 \* Some old references to Model API may exist, but this API has been deprecated.
 
-## NDArray API
-
-```eval_rst
-.. toctree::
-   :maxdepth: 1
-
-   ndarray/ndarray.md
-   ndarray/random.md
-   ndarray/linalg.md
-   ndarray/sparse.md
-   ndarray/contrib.md
-```
-
-## Symbol API
+## Autograd API
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   symbol/symbol.md
-   symbol/random.md
-   symbol/linalg.md
-   symbol/sparse.md
-   symbol/contrib.md
-   symbol/rnn.md
+   autograd/autograd.md
 ```
 
-## Module API
+## Callback API
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   module/module.md
-   executor/executor.md
+   callback/callback.md
 ```
 
-## Autograd API
+## Contrib Package
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   autograd/autograd.md
+   contrib/contrib.md
+   contrib/text.md
+   contrib/onnx.md
 ```
 
 ## Gluon API
@@ -86,6 +69,15 @@ Code examples are placed throughout the API documentation and these can be run a
    gluon/contrib.md
 ```
 
+## Image API
+
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   image/image.md
+```
+
 ## IO API
 
 ```eval_rst
@@ -95,40 +87,54 @@ Code examples are placed throughout the API documentation and these can be run a
    io/io.md
 ```
 
-## Image API
+## KV Store API
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   image/image.md
+   kvstore/kvstore.md
 ```
 
-## Optimization API
+## Metric API
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   optimization/optimization.md
+   metric/metric.md
 ```
 
-## Callback API
+## Module API
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   callback/callback.md
+   module/module.md
+   executor/executor.md
 ```
 
-## Metric API
+## NDArray API
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   metric/metric.md
+   ndarray/ndarray.md
+   ndarray/random.md
+   ndarray/linalg.md
+   ndarray/sparse.md
+   ndarray/contrib.md
+```
+
+## Optimization API
+
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   optimization/optimization.md
 ```
 
 ## Profiler API
@@ -144,18 +150,30 @@ Code examples are placed throughout the API documentation and these can be run a
 
 ```eval_rst
 .. toctree::
-   :maxdepth 1
+   :maxdepth: 1
 
    rtc/rtc.md
 ```
 
-## Contrib Package
+## Symbol API
 
 ```eval_rst
 .. toctree::
    :maxdepth: 1
 
-   contrib/contrib.md
-   contrib/text.md
-   contrib/onnx.md
+   symbol/symbol.md
+   symbol/random.md
+   symbol/linalg.md
+   symbol/sparse.md
+   symbol/contrib.md
+   symbol/rnn.md
+```
+
+## Symbol in Pictures API
+
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   symbol_in_pictures/symbol_in_pictures.md
 ```
diff --git a/docs/api/scala/index.md b/docs/api/scala/index.md
index e96892b5800..8b32c9fe9e2 100644
--- a/docs/api/scala/index.md
+++ b/docs/api/scala/index.md
@@ -1,9 +1,23 @@
 # MXNet - Scala API
+
 MXNet supports the Scala programming language. The MXNet Scala package brings flexible and efficient GPU
 computing and state-of-art deep learning to Scala. It enables you to write seamless tensor/matrix computation with multiple GPUs in Scala. It also lets you construct and customize the state-of-art deep learning models in Scala, and apply them to tasks, such as image classification and data science challenges.
 
 See the [MXNet Scala API Documentation](docs/index.html#org.apache.mxnet.package) for detailed API information.
 
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   infer.md
+   io.md
+   kvstore.md
+   model.md
+   module.md
+   ndarray.md
+   symbol_in_pictures.md
+   symbol.md
+```
 
 ## Image Classification with the Scala Infer API
 The Infer API can be used for single and batch image classification. More information can be found at the following locations:
diff --git a/docs/architecture/index.md b/docs/architecture/index.md
index 91fb5f51d7b..189e76e62fa 100644
--- a/docs/architecture/index.md
+++ b/docs/architecture/index.md
@@ -15,9 +15,15 @@ Mainly, they focus on the following 3 areas:
 abstraction, optimization, and trade-offs between efficiency and flexibility.
 Additionally, we provide an overview of the complete MXNet system.
 
-* [MXNet System Overview](http://mxnet.io/architecture/overview.html)
-* [Deep Learning Programming Style: Symbolic vs Imperative](http://mxnet.io/architecture/program_model.html)
-* [Dependency Engine for Deep Learning](http://mxnet.io/architecture/note_engine.html)
-* [Optimizing the Memory Consumption in Deep Learning](http://mxnet.io/architecture/note_memory.html)
-* [Efficient Data Loading Module for Deep Learning](http://mxnet.io/architecture/note_data_loading.html)
-* [Exception Handling in MXNet](http://mxnet.io/architecture/exception_handling.html)
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   overview.md
+   program_model.md
+   note_engine.md
+   note_memory.md
+   note_data_loading.md
+   exception_handling.md
+   rnn_interface.md
+```
diff --git a/docs/architecture/release_note_0_9.md b/docs/architecture/release_note_0_9.md
deleted file mode 100644
index afcc091d7cc..00000000000
--- a/docs/architecture/release_note_0_9.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# MXNet 0.9 (NNVM) Release Note
-
-Version 0.9 brings a number of important features and changes, including a back-end refactor to adopt the [NNVM](https://github.com/dmlc/nnvm) framework, a profiler for analyzing performance, a fast image IO and augmentation module that bypasses GIL, and various other changes.
-
-## NNVM Refactor
-
-NNVM is a library for neural network graph construction, optimization, and operator registration. It serves as an intermediary layer between the front-end (MXNet user API) and the back-end (computation on the device). After version 0.9, MXNet fully adopts the NNVM framework. Now it's easier to create operators. You can also register "pass"es that process and optimizes the graph when `bind` is called on the symbol. For more discussion on how to create operators with NNVM, please refer to [How to Create New Operators](../faq/new_op.md)
-
-Other changes brought by NNVM include:
-- Backward shape inference is now supported
-- All operators can now be used with both symbolic and ndarray API. For example, `mx.nd.Activation(x, act_type='relu')` works now.
-- Optional cython API for mx.symbol and mx.ndarray is now available. Use `make cython` to activate it for accelerated communication with the back-end.
-
-## Profiler
-
-![MLP Profile](https://cloud.githubusercontent.com/assets/17693755/18035938/0a43484a-6d93-11e6-80d4-241c6ca552ea.png)
-
-MXNet now provides a native profiler for analyzing the performance of operators. This feature compliments general profiling tools like nvprof and gprof by summarizing at the operator level, instead of function, kernel, or instruction level.
-
-To use this feature, first set `USE_PROFILER = 1` in `config.mk` and rebuild mxnet. Then add three lines at the beginning and end of the section of your program you want to profile:
-```python
-mx.profiler.profiler_set_config(mode=scope, filename=fname)
-profiler.profiler_set_state('run')
-
-# do computation ...
-
-profiler.profiler_set_state('stop')
-```
-`scope` can be 'symbolic' (to only include symbolic operations) or 'all' (to include all operations), and `fname` is the path to save profiler output.
-
-After program finishes, navigate to [chrome://tracing](chrome://tracing) in a Chrome browser and load profiler output to see the results.
-
-## Image IO
-
-MXNet already has `mx.io.ImageRecordIter` for loading and preprocessing images. However, some tasks need more flexible image processing API. Detection, for example, requires transforming labels together with images. Usually, people write custom data iterators in python to handle this. But due to the infamous Global Interpreter Lock (GIL), python scripts cannot use multithreading to speed up processing.
-
-`mx.image` provides a set of fast image processing API that leverage MXNet Engine to automatically parallelize processing. You can write
-```python
-imgs = [mx.image.imdecode(open(f).read()) for f in img_paths]
-```
-and decoding will be automatically run in parallel.
-
-## Miscellaneous
-
-- sgd and adam optimizer are now implemented with a single imperative call. They should be as fast and memory efficient as cc optimizers. ccsgd is now deprecated and redirects to sgd.
-- Layout support is added. Use `mx.io.DataDesc(..., layout='NHWC')` in provide_data to specify data layout. use `mx.sym.YourSymbol(..., __layout__='NHWC')` to specify output layout. `layout` option is now available for Convolution layer.
-- element_mask is removed. Please use src*mask.reshape((mask.size, 1, 1, ..., 1)) directly as binary ops now support broadcasting.
-- sum_axis, max_axis, and min_axis are deprecated. Please use mx.nd.max(src, axis=n) instead.
-- symbol attributes are now limited to ctx_group, lr_mult, wd_mult, force_mirroring. All other custom attributes need to be in __xxx__ format (start and end with double underscore) or an error will be triggered during attribute parsing.
diff --git a/docs/community/index.md b/docs/community/index.md
new file mode 100644
index 00000000000..7bdb1c21350
--- /dev/null
+++ b/docs/community/index.md
@@ -0,0 +1,11 @@
+# MXNet Community
+
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   contribute.md
+   ecosystem.md
+   powered_by.md
+   mxnet_channels.md
+```
diff --git a/docs/faq/index.md b/docs/faq/index.md
index 07dd9b9d7ca..1b4a95d3f33 100644
--- a/docs/faq/index.md
+++ b/docs/faq/index.md
@@ -1,5 +1,13 @@
 # MXNet FAQ
 
+```eval_rst
+.. toctree::
+   :hidden:
+   :glob:
+
+   *
+```
+
 This section addresses common questions about how to use _MXNet_. These include performance issues, e.g., how to train with multiple GPUs.
 They also include workflow questions, e.g., how to visualize a neural network computation graph.
 These answers are fairly focused. For more didactic, self-contained introductions to neural networks
diff --git a/docs/get_started/index.md b/docs/get_started/index.md
deleted file mode 100644
index a743930b33d..00000000000
--- a/docs/get_started/index.md
+++ /dev/null
@@ -1,8 +0,0 @@
-
-<html lang="en-US">
-    <head>
-        <meta charset="UTF-8">
-        <meta http-equiv="refresh" content="0; url=why_mxnet.html">
-        <title>Page Redirection</title>
-    </head>
-</html>
diff --git a/docs/gluon/index.md b/docs/gluon/index.md
index 4bea06edcab..c0d9053cd2c 100644
--- a/docs/gluon/index.md
+++ b/docs/gluon/index.md
@@ -1,9 +1,11 @@
-![](https://github.com/dmlc/web-data/blob/master/mxnet/image/image-gluon-logo.png?raw=true)
+# About Gluon
+
+![gluon logo](https://github.com/dmlc/web-data/blob/master/mxnet/image/image-gluon-logo.png?raw=true)
 
 Based on the [the Gluon API specification](https://github.com/gluon-api/gluon-api), the new Gluon library in Apache MXNet provides a clear, concise, and simple API for deep learning. It makes it easy to prototype, build, and train deep learning models without sacrificing training speed. Install the latest version of MXNet to get access to Gluon by either following these easy steps or using this simple command:
 
-```python
-    pip install mxnet --pre --user
+```bash
+    pip install mxnet
 ```
 <br/>
 <div class="boxed">
@@ -39,8 +41,8 @@ Use plug-and-play neural network building blocks, including predefined layers, o
 
 ```python
 net = gluon.nn.Sequential()
-# When instantiated, Sequential stores a chain of neural network layers. 
-# Once presented with data, Sequential executes each layer in turn, using 
+# When instantiated, Sequential stores a chain of neural network layers.
+# Once presented with data, Sequential executes each layer in turn, using
 # the output of one layer as the input for the next
 with net.name_scope():
     net.add(gluon.nn.Dense(256, activation="relu")) # 1st layer (256 nodes)
@@ -81,7 +83,7 @@ def forward(self, F, inputs, tree):
 <br/>
 **__High Performance__**
 
-Easily cache the neural network to achieve high performance by defining your neural network with ``HybridSequential`` and calling the ``hybridize`` method: 
+Easily cache the neural network to achieve high performance by defining your neural network with ``HybridSequential`` and calling the ``hybridize`` method:
 
 ```python
 net = nn.HybridSequential()
diff --git a/docs/index.md b/docs/index.md
index 7e251131fee..ab6a95dc0dd 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,14 +1,15 @@
-Contents
---------
-These are used to generate the indexes for search functionality.
+# MXNet
 
-- [Python Documents](api/python/index.md)
-- [R Documents](api/r/index.md)
-- [Julia Documents](api/julia/index.md)
-- [C++ Documents](api/c++/index.md)
-- [Scala Documents](api/scala/index.md)
-- [Perl Documents](api/perl/index.md)
-- [HowTo Documents](faq/index.md)
-- [System Documents](architecture/index.md)
-- [Tutorials](tutorials/index.md)
-- [Community](community/contribute.md)
+```eval_rst
+.. toctree::
+   :maxdepth: 1
+
+   api/index.md
+   architecture/index.md
+   community/index.md
+   faq/index.md
+   gluon/index.md
+   install/index.md
+   model_zoo/index.md
+   tutorials/index.md
+```
diff --git a/docs/tutorials/basic/index.md b/docs/tutorials/basic/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/basic/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/c++/index.md b/docs/tutorials/c++/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/c++/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/embedded/index.md b/docs/tutorials/embedded/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/embedded/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/gluon/index.md b/docs/tutorials/gluon/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/gluon/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md
index ae0851425be..82e8ac9e41b 100644
--- a/docs/tutorials/index.md
+++ b/docs/tutorials/index.md
@@ -1,5 +1,24 @@
 # Tutorials
 
+```eval_rst
+.. toctree::
+   :hidden:
+
+   basic/index.md
+   c++/index.md
+   embedded/index.md
+   gluon/index.md
+   nlp/index.md
+   onnx/index.md
+   python/index.md
+   r/index.md
+   scala/index.md
+   sparse/index.md
+   speech_recognition/index.md
+   unsupervised_learning/index.md
+   vision/index.md
+```
+
 MXNet tutorials can be found in this section. A variety of language bindings are available for MXNet (including Python, Scala, C++ and R) and we have a different tutorial section for each language.
 
 Are you new to MXNet, and don't have a preference on language? We currently recommend starting with Python, and specifically the Gluon APIs (versus Module APIs) as they're more flexible and easier to debug.
diff --git a/docs/tutorials/nlp/index.md b/docs/tutorials/nlp/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/nlp/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/onnx/index.md b/docs/tutorials/onnx/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/onnx/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/python/index.md b/docs/tutorials/python/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/python/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/r/index.md b/docs/tutorials/r/index.md
index 4692e7adce7..fbc8911f2a6 100644
--- a/docs/tutorials/r/index.md
+++ b/docs/tutorials/r/index.md
@@ -4,18 +4,9 @@ These tutorials introduce a few fundamental concepts in deep learning and how to
 
 ```eval_rst
 .. toctree::
-   :maxdepth: 1
+   :glob:
 
-   ndarray
-   symbol
-   fiveMinutesNeuralNetwork
-   classifyRealImageWithPretrainedModel
-   mnistCompetition
-   CatsDogsFinetune
-   CharRnnModel
-   CallbackFunction
-   CustomIterator
-   CustomLossFunction
+   *
 ```
 
 <br>
diff --git a/docs/tutorials/sparse/index.md b/docs/tutorials/sparse/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/sparse/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/speech_recognition/index.md b/docs/tutorials/speech_recognition/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/speech_recognition/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/unsupervised_learning/index.md b/docs/tutorials/unsupervised_learning/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/unsupervised_learning/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/docs/tutorials/vision/index.md b/docs/tutorials/vision/index.md
new file mode 100644
index 00000000000..87d72894424
--- /dev/null
+++ b/docs/tutorials/vision/index.md
@@ -0,0 +1,8 @@
+# Tutorials
+
+```eval_rst
+.. toctree::
+   :glob:
+
+   *
+```
diff --git a/tests/tutorials/test_sanity_tutorials.py b/tests/tutorials/test_sanity_tutorials.py
index f87e98e9212..e59521f2704 100644
--- a/tests/tutorials/test_sanity_tutorials.py
+++ b/tests/tutorials/test_sanity_tutorials.py
@@ -24,8 +24,15 @@
 # automated test suite.
 # Rules to be in the whitelist:
 # - not a python tutorial
-whitelist = ['c++/basics.md',
+whitelist = ['basic/index.md',
+             'c++/basics.md',
+             'c++/index.md',
+             'embedded/index.md',
              'embedded/wine_detector.md',
+             'gluon/index.md',
+             'nlp/index.md',
+             'onnx/index.md',
+             'python/index.md',
              'r/CallbackFunction.md',
              'r/charRnnModel.md',
              'r/classifyRealImageWithPretrainedModel.md',
@@ -39,7 +46,11 @@
              'scala/char_lstm.md',
              'scala/mnist.md',
              'scala/index.md',
-             'scala/mxnet_scala_on_intellij.md']
+             'scala/mxnet_scala_on_intellij.md',
+             'sparse/index.md',
+             'speech_recognition/index.md',
+             'unsupervised_learning/index.md',
+             'vision/index.md']
 whitelist_set = set(whitelist)
 
 def test_tutorial_downloadable():


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services