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.]
模型有进行哪些改动吗?
看报错信息你是使用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