Paddleserving服务化部署 tensorrt报错, shape of trt subgraph is [-1,-1,768],

报错

Paddleserving服务化部署 tensorrt报错, shape of trt subgraph is [-1,-1,768],_第1张图片

解决方案 1

https://github.com/PaddlePaddle/Serving/blob/v0.9.0/doc/TensorRT_Dynamic_Shape_CN.md

https://github.com/PaddlePaddle/Paddle-Inference-Demo/tree/master/python/gpu/tuned_dynamic_shape

The input [layer_norm_62.tmp_2] shape of trt subgraph is [-1,-1,768], please enable trt dynamic_shape mode by SetTRTDynamicShapeInfo

需要设置dynamic shape

解决方案 2

关闭trt,只开启gpu预测
在这里插入图片描述

你可能感兴趣的:(NLP实战项目,各种报错,深度学习,人工智能)