首页 Paddle Inference 帖子详情
PP-YOLO模型,用C++推理的时候,CreatePredictor 出错
收藏
快速回复
Paddle Inference 问答推理 1500 2
PP-YOLO模型,用C++推理的时候,CreatePredictor 出错
收藏
快速回复
Paddle Inference 问答推理 1500 2

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.]

0
收藏
回复
全部评论(2)
时间顺序
由兀C
#2 回复于2021-07

模型有进行哪些改动吗?

0
回复
由兀C
#3 回复于2021-07

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

可以参考相关issue:https://github.com/PaddlePaddle/Paddle/issues/34390#issuecomment-888920902

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户