Paddle PP-YOLO模型,用C++推理的时候,CreatePredictor 出错

sdnqo3pr  于 2022-04-21  发布在  Java
关注(0)|答案(3)|浏览(266)

PP-YOLO模型,使用C++推理,CreatePredictor 报如下错,哪位大神帮忙看一下什么原因

WARNING: Logging before InitGoogleLogging() is written to STDERR
E0723 23:02:00.150832 19976 helper.h:84] reshape (Output: reshape2_8.tmp_01204): volume mismatch. Input dimensions [150061202,1,1] have volume 150061202 and output dimensions [1,1,38] have volume 38.
E0723 23:02:00.151834 19976 helper.h:84] Could not compute dimensions for reshape2_8.tmp_01204, because the network is not valid.
E0723 23:02:00.151834 19976 helper.h:84] Network validation failed.

C++ Traceback (most recent call last):

Not support stack backtrace yet.

Error Message Summary:

FatalError: Build TensorRT cuda engine failed! Please recheck you configurations related to paddle-TensorRT.
[Hint: infer_engine_ should not be null.]

主要是模型方面问题还是部署方面的问题
来自帖子 链接:https://aistudio.baidu.com/paddle/forum/topic/show/989467

zphenhs4

zphenhs41#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

yshpjwxd

yshpjwxd2#

看报错信息你是使用TensorRT预测,TensorRT预测需要安装的Paddle版本是带TensorRT编译的,目前默认发布的whl包是不带TensorRT的,如果想用TensorRT预测需要编译一下Paddle,编译时使用-DTENSORRT_ROOT指定一下TensorRT路径,编译方法参考 https://www.paddlepaddle.org.cn/documentation/docs/zh/install/compile/fromsource.html

13z8s7eq

13z8s7eq3#

使用C++预测也需要重新编译paddle吗

相关问题