Tengine icon indicating copy to clipboard operation
Tengine copied to clipboard

problem about convert model

Open dkerjw1 opened this issue 6 years ago • 8 comments

hi, I built the Tengin in Mac OS and Ubuntu 18.04 separately, and I test it in rk3399 use adb successfully , but I got the error like followings in both two platform when I try to convert the caffemodel to tmfile.

B000000119358A:convert mengqingyue$ ./convert_caffe_to_tm
-bash: ./convert_caffe_to_tm: cannot execute binary file

Could you give me some help?

dkerjw1 avatar Dec 21 '19 12:12 dkerjw1

@QingyueMeng hi, You can download the model conversion tools here.

erkaiya avatar Dec 21 '19 14:12 erkaiya

@QingyueMeng hi, You can download the model conversion tools here.

@erkaiyang hi, I download the tool from the link, and I run the command like this:

./convert_model_to_tm -h -f caffe -p mnasnet_192x144_1031_3.prototxt -m mnasnet_192x144_1031_3.caffemodel -o mnasnet_192x144_1031_3.tmfile

but I got the message like following:

[Usage]: ./convert_model_to_tm [-h] [-f file_format] [-p proto_file] [-m model_file] [-o output_tmfile]

so, is there something wrong in the command? and can you give me an example about how to use it?

thank you

dkerjw1 avatar Dec 23 '19 06:12 dkerjw1

and another question. can I create my android studio project on Mac OS?

dkerjw1 avatar Dec 23 '19 06:12 dkerjw1

@QingyueMeng hi,

-h means help,try removing -h

./convert_model_to_tm -f caffe -p mnasnet_192x144_1031_3.prototxt -m mnasnet_192x144_1031_3.caffemodel -o mnasnet_192x144_1031_3.tmfile

erkaiya avatar Dec 23 '19 07:12 erkaiya

@QingyueMeng hi,

-h means help,try removing -h

./convert_model_to_tm -f caffe -p mnasnet_192x144_1031_3.prototxt -m mnasnet_192x144_1031_3.caffemodel -o mnasnet_192x144_1031_3.tmfile

@erkaiyang and there is another error.

tengine_model/convert$ ./convert_model_to_tm  -f caffe -p mnasnet_192x144_1031_3.prototxt -m mnasnet_192x144_1031_3.caffemodel -o mnasnet_192x144_1031_3.tmfile
The input file specified is using deprecated params: mnasnet_192x144_1031_3.prototxt
Please upgrade the input file by using caffe tools(upgrade_net_proto_text/upgrade_net_proto_binary).
Create graph failed
errno: 22

why it get the error?

dkerjw1 avatar Dec 23 '19 08:12 dkerjw1

@QingyueMeng

Your model is too old,and you can refer to FAQ11 in the link below https://github.com/OAID/Tengine/wiki/FAQ

erkaiya avatar Dec 23 '19 09:12 erkaiya

@QingyueMeng

Your model is too old,and you can refer to FAQ11 in the link below https://github.com/OAID/Tengine/wiki/FAQ

@erkaiyang I update my caffe model, but it throw the error above yet. And then I tried to use onnx, but it throw another error:

tengine_model/convert$ ./convert_model_to_tm -f onnx -m mnasnet_10313.onnx -o mnasnet_10313.tmfile
cannot find load function for operator: ConvTranspose
Segmentation fault (core dumped)

It can't suppert ConvTranspose?

or if you can give same advise or help?

dkerjw1 avatar Dec 23 '19 10:12 dkerjw1

@QingyueMeng Tengine does not support this operator. You can view the supported operators here.

erkaiya avatar Dec 24 '19 07:12 erkaiya