You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
你好,我尝试将PP-FormulaNet-S的模型转换为onnx的模型,我用的是paddle自带的工具,我运行的命令是:
paddle2onnx --model_dir /root/.paddlex/official_models/PP-FormulaNet-S/ --model_filename inference.json --params_filename inference.pdiparams --save_file PP-FormulaNet-S.onnx --opset_version 11 --enable_onnx_checker True
但是转换出来的onnx模型,我在python环境测试了一下,同一张图,onnx模型的输出和paddle原生模型的输出有点不一致。
onnx模型的输出:
[array([[ 0, 0, 0, 82, 2186, 243, 113, 279, 243, 115, 243,
82, 243, 243, 243, 82, 243, 243, 82, 243, 82, 243,
243, 30, 82, 82, 82, 707, 243, 113, 243, 39, 115,
243, 113, 243, 82, 243, 115, 243, 82, 2387, 243, 82,
243, 30, 243, 243, 707, 82, 82, 1278, 113, 113, 243,
115, 115, 243, 113, 243, 40, 243, 115, 243, 31, 2]],
dtype=int64)]
paddle原生模型的输出:
[array([[
0, 0, 0, 82, 2186, 243, 113, 243, 82, 707, 243,
113, 243, 40, 243, 115, 243, 113, 243, 82, 1278, 243,
115, 243, 115, 243, 82, 2387, 243, 30, 279, 243, 35,
243, 82, 707, 243, 113, 243, 82, 1278, 243, 115, 243,
113, 243, 42, 243, 115, 243, 31, 2, 82, 2]])]
我在paddlex的源码里面,在模型推理之前把模型的输入数据存到txt文档里,然后onnx也是在模型推理之前把模型输入存到txt文档里,对面了一下这两个txt文档的内容是一致的,我怀疑是paddle2onnx转出来的onnx模型存在问题,所以我想请教一下,应该怎么正确的导出onnx模型
Beta Was this translation helpful? Give feedback.
All reactions