Paddle2ONNX icon indicating copy to clipboard operation
Paddle2ONNX copied to clipboard

paddle2onnx需要模型目录下有 ‘__model__’是什么东西?

Open ingale726 opened this issue 4 years ago • 1 comments

paddle2onnx 0.4版本 转换命令:paddle2onnx --model_dir D:/work/PaddleOCR-dygraph/inference/rec/ --save_file 1.onnx 提示 FileNotFoundError: [Errno 2] No such file or directory: 'D:\work\PaddleOCR-dygraph\inference\rec\model' 文档是这么写的: 参数被保存为多个文件(not combined),只需要指定--model_dir,该目录下面需要包含了'model',以及多个参数文件。 我是直接下的官方的推理模型,有三个模型文件,inference.pdiparams,inference.pdiparams.info,inference.pdmodel,可以正常推理,__model__去哪弄?

ingale726 avatar Dec 31 '20 05:12 ingale726

paddle2onnx 0.4版本 转换命令:paddle2onnx --model_dir D:/work/PaddleOCR-dygraph/inference/rec/ --save_file 1.onnx 提示 FileNotFoundError: [Errno 2] No such file or directory: 'D:\work\PaddleOCR-dygraph\inference\rec*model*' 文档是这么写的: 参数被保存为多个文件(not combined),只需要指定--model_dir,该目录下面需要包含了'model',以及多个参数文件。 我是直接下的官方的推理模型,有三个模型文件,inference.pdiparams,inference.pdiparams.info,inference.pdmodel,可以正常推理,__model__去哪弄?

你这里应该使用了2.0的Paddle,在导出为部署模型后,你按如下命令转换试试

paddle2onnx --model_dir D:/work/PaddleOCR-dygraph/inference/rec/  --model_filename inference.pdmodel --params_filename inference.pdiparams

jiangjiajun avatar Jan 04 '21 02:01 jiangjiajun

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 04 '25 02:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 18 '25 03:07 github-actions[bot]