You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/12/03 12:13:41 UTC
[GitHub] [incubator-mxnet] romeolandry opened a new issue #16967: Cannot
import [yolo3]() model from onnx/model zoo
romeolandry opened a new issue #16967: Cannot import [yolo3]() model from onnx/model zoo
URL: https://github.com/apache/incubator-mxnet/issues/16967
## Description
I downloaded [yolo3](https://github.com/onnx/models/blob/master/vision/object_detection_segmentation/yolov3) model from onnx/model zoo. I tried to import that to mxnet via mxnet.contrib.onnx but get the following error message.
### Error Message
--------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-13-7a0ead8a05d3> in <module>
1 import mxnet.contrib.onnx as onnx_mxnet
----> 2 sym, arg_params, aux_params = onnx_mxnet.import_model('ssd.onnx')
~/Donnees/test-framework/mxnet_test/env_mxnet/lib/python3.7/site-packages/mxnet/contrib/onnx/onnx2mx/import_model.py in import_model(model_file)
57 # loads model file and returns ONNX protobuf object
58 model_proto = onnx.load_model(model_file)
---> 59 sym, arg_params, aux_params = graph.from_onnx(model_proto.graph)
60 return sym, arg_params, aux_params
61
~/Donnees/test-framework/mxnet_test/env_mxnet/lib/python3.7/site-packages/mxnet/contrib/onnx/onnx2mx/import_onnx.py in from_onnx(self, graph)
114 onnx_attr = self._parse_attr(node.attribute)
115 inputs = [self._nodes[i] for i in node.input]
--> 116 mxnet_sym = self._convert_operator(node_name, op_name, onnx_attr, inputs)
117
118 for k, i in zip(list(node.output), range(len(mxnet_sym.list_outputs()))):
~/Donnees/test-framework/mxnet_test/env_mxnet/lib/python3.7/site-packages/mxnet/contrib/onnx/onnx2mx/import_onnx.py in _convert_operator(self, node_name, op_name, attrs, inputs)
60 """
61 if op_name in convert_map:
---> 62 op_name, new_attrs, inputs = convert_map[op_name](attrs, inputs, self)
63 else:
64 raise NotImplementedError("Operator {} not implemented.".format(op_name))
~/Donnees/test-framework/mxnet_test/env_mxnet/lib/python3.7/site-packages/mxnet/contrib/onnx/onnx2mx/_op_translations.py in reshape(attrs, inputs, proto_obj)
460 if len(inputs) == 1:
461 return 'reshape', attrs, inputs[0]
--> 462 reshape_shape = list(proto_obj._params[inputs[1].name].asnumpy())
463 reshape_shape = [int(i) for i in reshape_shape]
464 new_attrs = {'shape': reshape_shape}
KeyError: 'Concat_347'
## To Reproduce
import mxnet.contrib.onnx as onnx_mxnet
sym, arg_params, aux_params = onnx_mxnet.import_model('ssd.onnx')
## Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
```
curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python
# paste outputs here
----------Python Info----------
Version : 3.7.3
Compiler : GCC 8.3.0
Build : ('default', 'Oct 7 2019 12:56:13')
Arch : ('64bit', 'ELF')
------------Pip Info-----------
Version : 18.1
Directory : /usr/lib/python3/dist-packages/pip
----------MXNet Info-----------
No MXNet installed.
----------System Info----------
Platform : Linux-5.0.0-36-generic-x86_64-with-Ubuntu-19.04-disco
system : Linux
node : kamgo-ThinkPad-T430
release : 5.0.0-36-generic
version : #39-Ubuntu SMP Tue Nov 12 09:46:06 UTC 2019
----------Hardware Info----------
machine : x86_64
processor : x86_64
Architektur: x86_64
CPU Operationsmodus: 32-bit, 64-bit
Byte-Reihenfolge: Little Endian
Address sizes: 36 bits physical, 48 bits virtual
CPU(s): 4
Liste der Online-CPU(s): 0-3
Thread(s) pro Kern: 2
Kern(e) pro Socket: 2
Sockel: 1
NUMA-Knoten: 1
Anbieterkennung: GenuineIntel
Prozessorfamilie: 6
Modell: 58
Modellname: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
Stepping: 9
CPU MHz: 1813.624
Maximale Taktfrequenz der CPU: 3300,0000
Minimale Taktfrequenz der CPU: 1200,0000
BogoMIPS: 5188.19
Virtualisierung: VT-x
L1d Cache: 32K
L1i Cache: 32K
L2 Cache: 256K
L3 Cache: 3072K
NUMA-Knoten0 CPU(s): 0-3
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services