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

Update ONNX API docs references #12317

Merged
merged 2 commits into from
Aug 27, 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
22 changes: 11 additions & 11 deletions docs/api/python/contrib/onnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ This document describes all the ONNX-MXNet APIs.
.. autosummary::
:nosignatures:

mxnet.contrib.onnx.import_model
mxnet.contrib.onnx.get_model_metadata
mxnet.contrib.onnx.import_to_gluon
mxnet.contrib.onnx.export_model
mxnet.contrib.onnx.onnx2mx.import_model
mxnet.contrib.onnx.onnx2mx.import_to_gluon
mxnet.contrib.onnx.mx2onnx.export_model
```

## ONNX Tutorials

```eval_rst
.. toctree::
:maxdepth: 1

/tutorials/onnx/super_resolution.md
/tutorials/onnx/inference_on_onnx_model.md
/tutorials/onnx/fine_tuning_gluon.md
Expand All @@ -42,19 +41,20 @@ This document describes all the ONNX-MXNet APIs.
## ONNX Examples

* Face Recognition with [ArcFace](https://github.com/onnx/models/tree/master/models/face_recognition/ArcFace)
* Image Classification with [MobileNet](https://github.com/onnx/models/tree/master/models/image_classification/mobilenet), [ResNet](https://github.com/onnx/models/tree/master/models/image_classification/resnet), [SqueezeNet](https://github.com/onnx/models/tree/master/models/image_classification/squeezenet), [VGG](https://github.com/onnx/models/tree/master/models/image_classification/vgg)
* Image Classification with [MobileNet](https://github.com/onnx/models/tree/master/models/image_classification/mobilenet), [ResNet](https://github.com/onnx/models/tree/master/models/image_classification/resnet), [SqueezeNet](https://github.com/onnx/models/tree/master/models/image_classification/squeezenet), [VGG](https://github.com/onnx/models/tree/master/models/image_classification/vgg)

## API Reference

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

```eval_rst

.. automodule:: mxnet.contrib.onnx.import_model
.. automodule:: mxnet.contrib.onnx.get_model_metadata
.. automodule:: mxnet.contrib.onnx.import_to_gluon
.. automodule:: mxnet.contrib.onnx.export_model

.. automodule:: mxnet.contrib.onnx.onnx2mx.import_model
:members: import_model, get_model_metadata
.. automodule:: mxnet.contrib.onnx.onnx2mx.import_to_gluon
:members: import_to_gluon
.. automodule:: mxnet.contrib.onnx.mx2onnx.export_model
:members: export_model
```

<script>auto_index("api-reference");</script>
2 changes: 1 addition & 1 deletion python/mxnet/contrib/onnx/mx2onnx/export_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# coding: utf-8
#pylint: disable-msg=too-many-arguments

"""export function"""
"""Exports an MXNet model to the ONNX model format"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
Expand Down
3 changes: 2 additions & 1 deletion python/mxnet/contrib/onnx/onnx2mx/import_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

# coding: utf-8
"""import function"""
"""Functions for importing ONNX models to MXNet and for checking metadata"""
# pylint: disable=no-member

from .import_onnx import GraphProto
Expand Down Expand Up @@ -72,6 +72,7 @@ def get_model_metadata(model_file):
'output_tensor_data' : <list of tuples representing the shape of the output
of the model>
}
"""
graph = GraphProto()
try:
Expand Down