onnx / onnx-caffe2

Caffe2 implementation of Open Neural Network Exchange (ONNX)
Other
165 stars 66 forks source link

Fail to convert caffe2 module to onnx module. #177

Open Lucasyc opened 6 years ago

Lucasyc commented 6 years ago

I can't convert a caffe2 module to onnx module. I first tried the example on README and then write a MINST module myself, both of them generated the following error messages. I am using x86_64 w/ Ubuntu 14.04 and no GPUs currently. Thanks in advance for any suggestions!

Traceback (most recent call last): File "caffe2toonnx.py", line 25, in value_info, File "/users/lucasyc/anaconda2/lib/python2.7/site-packages/onnx_caffe2/frontend.py", line 517, in caffe2_net_to_onnx_model model = make_model(cls.caffe2_net_to_onnx_graph(*args, *kwargs)) File "/users/lucasyc/anaconda2/lib/python2.7/site-packages/onnx_caffe2/frontend.py", line 357, in caffe2_net_to_onnx_graph cls._ssa_rewrite(predict_net, init_net, value_info) File "/users/lucasyc/anaconda2/lib/python2.7/site-packages/onnx_caffe2/frontend.py", line 492, in _ssa_rewrite assert re.match('GivenTensor.Fill', op.type) AssertionError

houseroad commented 6 years ago

This may be caused by some fake initializer of real input in the init_net.pb. I will create a PR to address this.

houseroad commented 6 years ago

https://github.com/caffe2/caffe2/pull/2058 should be fixed here.