Open JianyuZhan opened 1 month ago
您好,是哪个模型呢?
您好,是哪个模型呢?
您好,我用的是一个基于这个文档训练并导出的模型, 是基于 picodet_lcnet_x1_0_layout
训练的模型。
建议多循环一些次数测试下呢
The issue has no response for a long time and will be closed. You can reopen or new another issue if are still confused.
From Bot
这个至少在我的case里,是能稳定复现的。所以我现在关了GPU推理,明显快很多
其实不建议这么推理,如果真的想快速推理,建议使用TRT之类的加速方案
问题确认 Search before asking
Bug组件 Bug Component
No response
Bug描述 Describe the Bug
我在一台v100的机器上,用
PaddleDetection/deploy/python/infer.py
来推理, 发现用--device GPU
和不用,前者的速度居然比后者慢。测试过程:
不用GPU:
输出:
用GPU
输出
上面只展示了分别一次调用,但我实际每个都各测试了10次,均是非常稳定的 CPU快于GPU
我还在infer.py里对
Detector
加载的代码打打印了耗时,对推理代码detector.predict_image()
也打印了耗时,如上两条对应日志:对比上面日志看,加载和推理,用GPU都比CPU慢?? 这是因为单张推理,瓶颈反而在加载模型和数据到GPU上,导致反而更慢?
复现环境 Environment
os: Ubuntu 22.04 PaddleDetection: release/2.7 Paddle pythone libarary: 2.6.0
Bug描述确认 Bug description confirmation
是否愿意提交PR? Are you willing to submit a PR?