microsoft / MMdnn

MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML.
MIT License
5.8k stars 965 forks source link

mxnet->caffe failed #546

Open cyf518 opened 5 years ago

cyf518 commented 5 years ago

Platform (like ubuntu 16.04/win10): ubuntu 16.04 Python version: 2.7

Running scripts: i convert model from this link: https://github.com/ElegantGod/SSHA/tree/master/kmodel but failed, please help! thanks

my command: sudo mmconvert -sf mxnet -in mxnet/kmodel/model-symbol.json -iw mxnet/kmodel/model-0000.params -df caffe -om ssha

rainLiuplus commented 5 years ago

Hi @cyf518 , could you please paste your error log here? Thanks!

cyf518 commented 5 years ago

@rainLiuplus this is my error log, it prompts "not supported operator Crop", should i change it to slice? thand you!

intel@intel-computer:/home/intel_temp/liyuan/cyf/MMdnn$ sudo mmconvert -sf mxnet -in mxnet/kmodel/model-symbol.json -iw mxnet/kmodel/model-0000.params -df caffe -om ssha --inputShape 3,640,640 [13:54:36] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.3.0. Attempting to upgrade... [13:54:36] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded! /usr/local/lib/python2.7/dist-packages/mxnet/module/base_module.py:55: UserWarning: You created Module with Module(..., label_names=['softmax_label']) but input with name 'softmax_label' is not found in symbol.list_arguments(). Did you mean one of: data warnings.warn(msg) Warning: MXNet Parser has not supported operator null with name data. Warning: convert the null operator with name [data] into input layer. Warning: MXNet Parser has not supported operator Crop with name crop0. Traceback (most recent call last): File "/usr/local/bin/mmconvert", line 11, in load_entry_point('mmdnn==0.2.3', 'console_scripts', 'mmconvert')() File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/_script/convert.py", line 102, in _main ret = convertToIR._convert(ir_args) File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/_script/convertToIR.py", line 115, in _convert parser.run(args.dstPath) File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/common/DataStructure/parser.py", line 22, in run self.gen_IR() File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/mxnet/mxnet_parser.py", line 265, in gen_IR self.rename_UNKNOWN(current_node) File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/mxnet/mxnet_parser.py", line 376, in rename_UNKNOWN raise NotImplementedError() NotImplementedError

rainLiuplus commented 5 years ago

Hi @cyf518 , yes, the reason is that mxnet_parser does not support several ops in your model like Crop, Reshape etc. Slice is not implemented either. We will implement them soon. Thanks!

cyf518 commented 5 years ago

@rainLiuplus thank you for your kindly reply!