diff --git a/docs/api/python/contrib/onnx.md b/docs/api/python/contrib/onnx.md index 449941459163..f8210ad6a001 100644 --- a/docs/api/python/contrib/onnx.md +++ b/docs/api/python/contrib/onnx.md @@ -22,10 +22,9 @@ 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 @@ -33,7 +32,7 @@ This document describes all the ONNX-MXNet APIs. ```eval_rst .. toctree:: :maxdepth: 1 - + /tutorials/onnx/super_resolution.md /tutorials/onnx/export_mxnet_to_onnx.md /tutorials/onnx/inference_on_onnx_model.md @@ -43,7 +42,7 @@ 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 @@ -51,11 +50,12 @@ This document describes all the ONNX-MXNet APIs. ```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 ``` diff --git a/python/mxnet/contrib/onnx/mx2onnx/export_model.py b/python/mxnet/contrib/onnx/mx2onnx/export_model.py index 0dbfdc1d7b92..33292bf664a7 100644 --- a/python/mxnet/contrib/onnx/mx2onnx/export_model.py +++ b/python/mxnet/contrib/onnx/mx2onnx/export_model.py @@ -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 diff --git a/python/mxnet/contrib/onnx/onnx2mx/import_model.py b/python/mxnet/contrib/onnx/onnx2mx/import_model.py index 4e4d78637557..e190c3bdadc0 100644 --- a/python/mxnet/contrib/onnx/onnx2mx/import_model.py +++ b/python/mxnet/contrib/onnx/onnx2mx/import_model.py @@ -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 @@ -72,6 +72,7 @@ def get_model_metadata(model_file): 'output_tensor_data' : } + """ graph = GraphProto() try: