onnx / keras-onnx

Convert tf.keras/Keras models to ONNX
Apache License 2.0
381 stars 109 forks source link

the onnx_model can not use in openvino #426

Closed Martin0Li closed 4 years ago

Martin0Li commented 4 years ago

I got a squeezenet.onnx from openvino model zoo. And I convert the model to keras from onnx2kerashttps://github.com/nerox8664/onnx2keras. So I want to convert this keras model to onnx. But it is different between convert before and after.

jiafatom commented 4 years ago

Can you share the model please?

Martin0Li commented 4 years ago

Thank you so much.

------------------ 原始邮件 ------------------ 发件人: "David Fan"<notifications@github.com>; 发送时间: 2020年4月7日(星期二) 凌晨3:27 收件人: "onnx/keras-onnx"<keras-onnx@noreply.github.com>; 抄送: "MT"<785415704@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [onnx/keras-onnx] the onnx_model can not use in openvino (#426)

Can you share the model please?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

从QQ邮箱发来的超大附件

squeezenet1.1.onnx (4.73M, 无限期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?k=71383735b36682c72e46e71b45390417520a07020001575d1b0d01505b14020e545a1a0c540b0f15570d030353000e5a06085556632b364b474d5250195c585d420919044d5658564e380a&t=exs_ftn_download&code=6875c968

jiafatom commented 4 years ago

This issue contains two steps: (1) onnx->keras model using other repo (2) keras->onnx model using keras2onnx. If both steps run correctly, the onnx models before and after should have the same inference result, but it is possible that the final onnx model graph is different, because there is no guarantee that the two steps keep the model graph the same. As long as the inference result is the same, you don't need worry about it. If the inference is different, then we need first understand if (1) or (2) causes the difference. And only (2) is in the scope of keras2onnx.