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.78k stars 6.79k forks source link

MXNet model export to ONNX failed #18776

Open xizi opened 4 years ago

xizi commented 4 years ago

export rnn.GRU op failed, error message as follow: AttributeError: No conversion function registered for op type _rnn_param_concat yet.

szha commented 4 years ago

Thanks for reporting. We are removing that op in the RNN layer in the 2.0. It will need to be registered in 1.x. That operator should be registered as simple concatenation for ONNX.

xizi commented 4 years ago

Thanks for reply. Can your provide some references show how to register _rnn_param_concat op as concatenation.

szha commented 4 years ago

for export, I think it would be something similar to this: https://github.com/apache/incubator-mxnet/blob/85ff00d5c1dafc1e51aaae26f6664582b0eb6ae1/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py#L846-L861

xizi commented 4 years ago

After installed mxnet2.0 build from source. export model error: NotImplementedError: Only LSTM mode RNN conversion to ONNX is currently supported.

szha commented 4 years ago

cc @josephevans conversion of other RNN types will need to be added.