lupesko opened a new issue #10694: Importing an ONNX model (from model zoo) to MXNet errors out URL: https://github.com/apache/incubator-mxnet/issues/10694 ## Description Importing an ONNX model to MXNet errors out. Model: [FER+ Emotion Recognition](https://github.com/onnx/models/tree/master/emotion_ferplus) To reproduce: - Install MXNet Model Server `pip install mxnet-model-server` - Download the ONNX model listed above into the working directory, add signature.json and synset.txt - Export the ONNX model into MMS model archive `mxnet-model-export --model-name emotion-detection --model-path .` Expected result: emotion-detection.model file is created Actual result: error in the onnx-mxnet code (see below) ``` ## Environment info (Required) ``` ----------Python Info---------- Version : 3.6.4 Compiler : GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final) Build : ('default', 'Jan 16 2018 12:04:33') Arch : ('64bit', '') ------------Pip Info----------- Version : 10.0.1 Directory : /Users/hag/anaconda/envs/mms-onnx-talk-3-6/lib/python3.6/site-packages/pip ----------MXNet Info----------- Version : 1.2.0 Directory : /Users/hag/anaconda/envs/mms-onnx-talk-3-6/lib/python3.6/site-packages/mxnet Commit Hash : 7989782cca64db5469d31713e65d21c8e043bbc0 ----------System Info---------- Platform : Darwin-16.7.0-x86_64-i386-64bit system : Darwin node : 8c8590170440.ant.amazon.com release : 16.7.0 version : Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST 2018; root:xnu-3789.73.11~1/RELEASE_X86_64 ----------Hardware Info---------- machine : x86_64 processor : i386 b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP TSCI' b'machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 HLE AVX2 BMI2 INVPCID RTM SMAP RDSEED ADX IPT SGX FPU_CSDS MPX CLFSOPT' b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C' b'machdep.cpu.brand_string: Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz' ----------Network Test---------- Setting timeout: 10 Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0187 sec, LOAD: 0.6492 sec. Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0438 sec, LOAD: 0.1820 sec. Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0206 sec, LOAD: 1.0483 sec. Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0231 sec, LOAD: 0.1971 sec. Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0180 sec, LOAD: 0.3810 sec. Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0190 sec, LOAD: 0.1072 sec.``` Package used: Python ## Error Message: ``` File "/Users/hag/anaconda/envs/mms-onnx-talk-3-6/lib/python3.6/site-packages/mxnet/contrib/onnx/_import/import_model.py", line 53, in import_model sym, arg_params, aux_params = graph.from_onnx(model_proto.graph) File "/Users/hag/anaconda/envs/mms-onnx-talk-3-6/lib/python3.6/site-packages/mxnet/contrib/onnx/_import/import_onnx.py", line 114, in from_onnx mxnet_sym = self._convert_operator(node_name, op_name, onnx_attr, inputs) File "/Users/hag/anaconda/envs/mms-onnx-talk-3-6/lib/python3.6/site-packages/mxnet/contrib/onnx/_import/import_onnx.py", line 58, in _convert_operator op_name, new_attrs, inputs = convert_map[op_name](attrs, inputs, self) File "/Users/hag/anaconda/envs/mms-onnx-talk-3-6/lib/python3.6/site-packages/mxnet/contrib/onnx/_import/op_translations.py", line 216, in conv new_attrs = translation_utils._fix_channels('Convolution', new_attrs, inputs, cls) File "/Users/hag/anaconda/envs/mms-onnx-talk-3-6/lib/python3.6/site-packages/mxnet/contrib/onnx/_import/translation_utils.py", line 172, in _fix_channels raise ValueError("Unable to get channels/units attr from onnx graph.") ValueError: Unable to get channels/units attr from onnx graph. ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
