apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.77k stars 6.8k forks source link

ONNX model zoo missing json and params files #18862

Closed quantum-fusion closed 3 years ago

quantum-fusion commented 4 years ago

Description

(A clear and concise description of what the bug is.)

I want to download an ONNX model from the model Zoo. (https://github.com/onnx/models). Since the model zoo only provides the ONNX files

I do not know where to get these files from, and how to generate them. (see exporter function) (https://mxnet.apache.org/versions/1.6/api/python/docs/tutorials/deploy/export/onnx.html#How-to-use-MXNet-to-ONNX-exporter-API)

Where do these files come from, and can they be generated from the ONNX model?

Downloaded input symbol and params files

sym = './resnet-18-symbol.json' params = './resnet-18-0000.params'

paste outputs here

github-actions[bot] commented 4 years ago

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly. If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.

leezu commented 4 years ago

json and params file is the mxnet format. ONNX is a separate format. You can import onnx models to mxnet, or you can download mxnet model from mxnet model zoo.

quantum-fusion commented 4 years ago

The problem is the .ONNX model is custom, and did not come from the MxNet model zoo. Do you know how to generate the sym and params files themselves?

TristonC commented 3 years ago

@szha Has this issue solved in 1.x?

Zha0q1 commented 3 years ago

the .json and .params file are exported from MXNet. We can convert mxnet models to the onnx format and recently GluonCV has also converted many pretrained cv models and hosted them here https://github.com/dmlc/gluon-cv/tree/master/scripts/onnx

Zha0q1 commented 3 years ago

This is the doc for converting mxnet models to the onnx format in mxnet 1.8.

mxnet 1.9 release will also include a big update package to the mxnet2onnx conversion module, which will have more and better operator support, dynamic input shapes, multiple input dtypes and more