Paddle Detection GPU FasterRCNN 报错 CUDA9
Created by: wangjiawei04
复现步骤
docker run --rm -dit --name pddet hub.baidubce.com/paddlepaddle/serving:0.2.0-gpu
docker exec -it pddet bash
yum install -y libXext libSM libXrender
pip install paddlepaddle paddle_serving_server_gpu paddle_serving_client opencv-python ujson -i https://pypi.tuna.tsinghua.edu.cn/simple
wget https://paddle-serving.bj.bcebos.com/pddet_demo/faster_rcnn_model.tar.gz
wget https://paddle-serving.bj.bcebos.com/pddet_demo/paddle_serving_app-0.0.1-py2-none-any.whl
pip install -U paddle_serving_app-0.0.1-py2-none-any.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
tar xf faster_rcnn_model.tar.gz
cd faster_rcnn_model
GLOG_v=2 python -m paddle_serving_server_gpu.serve --model pddet_serving_model --port 9393 --gpu_id 0
python test_client.py pddet_client_conf/serving_client_conf.prototxt cpp_demo.yml 000000570688.jpg
CPU版本可以运行成功,但是GPU版本会出现如下报错 CUDA 9.0,就是CUDA版本对不上的错
我手动换成了CUDA10,出现如下报错
--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
------------------------------------------
Python Call Stacks (More useful to users):
------------------------------------------
File "/usr/lib64/python2.7/site-packages/paddle/fluid/framework.py", line 2525, in append_op
attrs=kwargs.get("attrs", None))
File "/usr/lib64/python2.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/paddle/fluid/layers/detection.py", line 2814, in generate_proposals
'RpnRoiProbs': rpn_roi_probs})
File "/PaddleDetection/ppdet/core/workspace.py", line 150, in partial_apply
return op(*args, **kwargs_)
File "/PaddleDetection/ppdet/modeling/anchor_heads/rpn_head.py", line 177, in get_proposals
variances=self.anchor_var)
File "/PaddleDetection/ppdet/modeling/architectures/faster_rcnn.py", line 100, in build
rois = self.rpn_head.get_proposals(body_feats, im_info, mode=mode)
File "/PaddleDetection/ppdet/modeling/architectures/faster_rcnn.py", line 248, in test
return self.build(feed_vars, 'test')
File "tools/export_model.py", line 108, in main
test_fetches = model.test(feed_vars)
File "tools/export_model.py", line 125, in <module>
main()
----------------------
Error Message Summary:
----------------------
Error: The index of gather_op should not be empty when the index's rank is 1.
[Hint: Expected index.dims()[0] > 0, but received index.dims()[0]:0 <= 0:0.] at (/paddle/paddle/fluid/operators/gather.cu.h:82)
[operator < generate_proposals > error]`