Skip to content

Commit fd45517

Browse files
szhapiiswrong
authored andcommitted
Doc src and fix (apache#8718)
* add viewcode * fix formatting
1 parent defd3c3 commit fd45517

File tree

6 files changed

+27
-18
lines changed

6 files changed

+27
-18
lines changed

docs/api/python/gluon/model_zoo.md

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This document lists the model APIs in Gluon:
1313
:nosignatures:
1414
1515
mxnet.gluon.model_zoo
16+
mxnet.gluon.model_zoo.vision
1617
```
1718

1819
The `Gluon Model Zoo` API, defined in the `gluon.model_zoo` package, provides pre-defined
@@ -182,6 +183,8 @@ In the rest of this document, we list routines provided by the `gluon.model_zoo`
182183

183184
```eval_rst
184185
186+
.. automodule:: mxnet.gluon.model_zoo
187+
185188
.. automodule:: mxnet.gluon.model_zoo.vision
186189
:members:
187190
:imported-members:

docs/api/python/ndarray/ndarray.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -559,13 +559,13 @@ The `ndarray` package provides several classes:
559559
.. autosummary::
560560
:nosignatures:
561561
562-
mxnet.nd.random.uniform
563-
mxnet.nd.random.normal
564-
mxnet.nd.random.gamma
565-
mxnet.nd.random.exponential
566-
mxnet.nd.random.poisson
567-
mxnet.nd.random.negative_binomial
568-
mxnet.nd.random.generalized_negative_binomial
562+
mxnet.ndarray.random.uniform
563+
mxnet.ndarray.random.normal
564+
mxnet.ndarray.random.gamma
565+
mxnet.ndarray.random.exponential
566+
mxnet.ndarray.random.poisson
567+
mxnet.ndarray.random.negative_binomial
568+
mxnet.ndarray.random.generalized_negative_binomial
569569
mxnet.random.seed
570570
```
571571

docs/api/python/symbol/symbol.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -558,13 +558,13 @@ Composite multiple symbols into a new one by an operator.
558558
.. autosummary::
559559
:nosignatures:
560560
561-
mxnet.sym.random.uniform
562-
mxnet.sym.random.normal
563-
mxnet.sym.random.gamma
564-
mxnet.sym.random.exponential
565-
mxnet.sym.random.poisson
566-
mxnet.sym.random.negative_binomial
567-
mxnet.sym.random.generalized_negative_binomial
561+
mxnet.symbol.random.uniform
562+
mxnet.symbol.random.normal
563+
mxnet.symbol.random.gamma
564+
mxnet.symbol.random.exponential
565+
mxnet.symbol.random.poisson
566+
mxnet.symbol.random.negative_binomial
567+
mxnet.symbol.random.generalized_negative_binomial
568568
mxnet.random.seed
569569
```
570570

docs/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
'sphinx.ext.autosummary',
6060
'sphinx.ext.napoleon',
6161
'sphinx.ext.mathjax',
62+
'sphinx.ext.viewcode',
6263
'breathe',
6364
'mxdoc'
6465
]

docs/mxdoc.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ def generate_doxygen(app):
6262

6363
def build_mxnet(app):
6464
"""Build mxnet .so lib"""
65-
_run_cmd("cd %s/.. && cp make/config.mk config.mk && make -j$(nproc) DEBUG=1" %
66-
app.builder.srcdir)
65+
if not os.path.exists(os.path.join(app.builder.srcdir, '..', 'config.mk')):
66+
_run_cmd("cd %s/.. && cp make/config.mk config.mk && make -j$(nproc) DEBUG=1" %
67+
app.builder.srcdir)
68+
else:
69+
_run_cmd("cd %s/.. && make -j$(nproc) DEBUG=1" %
70+
app.builder.srcdir)
6771

6872
def build_r_docs(app):
6973
"""build r pdf"""

python/mxnet/gluon/model_zoo/vision/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
- `MobileNet`_
3131
3232
You can construct a model with random weights by calling its constructor:
33+
3334
.. code::
3435
3536
from mxnet.gluon.model_zoo import vision
@@ -39,8 +40,8 @@
3940
densenet = vision.densenet_161()
4041
4142
We provide pre-trained models for all the models except ResNet V2.
42-
These can constructed by passing
43-
``pretrained=True``:
43+
These can constructed by passing ``pretrained=True``:
44+
4445
.. code::
4546
4647
from mxnet.gluon.model_zoo import vision

0 commit comments

Comments
 (0)