PaddlePaddle / FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.

Home Page:https://www.paddlepaddle.org.cn/fastdeploy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Xiaopu17 opened this issue · 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.

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