FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

[ERROR] fastdeploy/utils/utils.cc(54)::fastdeploy::ReadBinaryFromFile

Open Xiaopu17 opened this issue 2 years ago • 1 comments

环境

  • 【FastDeploy版本】:python cpu部署 Develop版本(Nightly build)
  • 【系统平台】: Windows x64(Windows10)
  • 【硬件】:
  • 【编译语言】: C++ / Python(3.7或3.8等)

问题日志及出现问题的操作流程

按照https://github.com/PaddlePaddle/FastDeploy/blob/develop/examples/runtime/python/infer_onnx_onnxruntime.py 方式推理本地onnx模型 调用代码

model_path = "salary_onnx.onnx"

option = fd.RuntimeOption()
option.set_model_path(model_path,model_format=ModelFormat.ONNX)

option.use_cpu()
option.use_ort_backend()
option.set_cpu_thread_num(12)

rt = fd.Runtime(option)
input_name = rt.get_input_info(0).name

调试运行至rt = fd.Runtime(option) 出现错误报告: [ERROR] fastdeploy/utils/utils.cc(54)::fastdeploy::ReadBinaryFromFile Failed to open file: salary_onnx.onnx to read. [ERROR] fastdeploy/runtime/backends/ort/ort_backend.cc(155)::fastdeploy::OrtBackend::Init Failed to read model file.

Xiaopu17 avatar Nov 19 '23 07:11 Xiaopu17

大概率是这个onnx模型还不被FD支持

rainyfly avatar Feb 06 '24 07:02 rainyfly