Paddle 安装paddlepaddle后,预测报错

acruukt9  于 2021-11-29  发布在  Java
关注(0)|答案(2)|浏览(1802)

ubuntu18 T4显卡 cuda10.2 cudnn 7.6 python3.6.9
python -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple 安装后显示成功
paddlehub 2.1.1
paddlenlp 2.1.1
paddlepaddle-gpu 2.1.3
使用paddlehub 进行预测
object_detector = hub.Module(name="yolov3_darknet53_coco2017")
frame_start= cv2.imread('real_see.jpg')
results = object_detector.object_detection(images=[frame_start],use_gpu=True)
print(results)

报错信息如下:

[2021-10-27 19:13:15,827] [ WARNING] - The _initialize method in HubModule will soon be deprecated, you can use theinit() to handle the initialization of the object
W1027 19:13:15.827836 43261 analysis_predictor.cc:1183] Deprecated. Please use CreatePredictor instead.

C++ Traceback (most recent call last):

0 paddle::framework::SignalHandle(char const*, int)
1 paddle::platform::GetCurrentTraceBackString

Error Message Summary:

FatalError: Segmentation fault is detected by the operating system.
[TimeInfo:Aborted at 1635333198 (unix time) try "date -d @1635333198" if you are using GNU date]
[SignalInfo:SIGSEGV (@0x0) received by PID 43261 (TID 0x7f6ab0072740) from PID 0]

段错误 (核心已转储)

为使您的问题得到快速解决,在建立Issue前,请您先通过如下方式搜索是否有相似问题:【搜索issue关键字】【使用labels筛选】【官方文档】

建立issue时,为快速解决问题,请您根据使用情况给出如下信息:

  • 标题:请包含关键词“安装错误”/“编译错误”,例如“Mac编译错误”
  • 版本、环境信息:

   1)PaddlePaddle版本:请提供您的PaddlePaddle版本号(如1.1)或CommitID
   2)CPU:请提供CPU型号,MKL/OpenBlas/MKLDNN/等数学库的使用情况
   3)GPU:请提供GPU型号,CUDA和CUDNN版本号
   4)系统环境:请说明系统类型、版本(如Mac OS 10.14)、Python版本
注:您可以通过执行summary_env.py获取以上信息。

  • 安装方式信息:

1)pip安装/docker安装
2)本地编译:请提供cmake命令,编译命令
3)docker编译:请提供docker镜像,编译命令           
 特殊环境请注明:如离线安装等

  • 复现信息:如为报错,请给出复现环境、复现步骤
  • 问题描述:请详细描述您的问题,同步贴出报错信息、日志/代码关键片段

Thank you for contributing to PaddlePaddle.
Before submitting the issue, you could search issue in Github in case that there was a similar issue submitted or resolved before.
If there is no solution,please make sure that this is an installation issue including the following details:

System information

-PaddlePaddle version (eg.1.1)or CommitID
-CPU: including CPUMKL/OpenBlas/MKLDNN version
-GPU: including CUDA/CUDNN version
-OS Platform (eg. Mac OS 10.14)
-Python version

  • Install method: pip install/install with docker/build from source(without docker)/build within docker
  • Other special cases that you think may be related to this problem, eg. offline install, special internet condition

Note: You can get most of the information by running summary_env.py.  

To Reproduce

Steps to reproduce the behavior

Describe your current behavior
Code to reproduce the issue
Other info / logs

ubof19bj

ubof19bj1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

eivnm1vs

eivnm1vs2#

您好,这个Warning会出现这条信息的原因是该模型是早期PaddleHub版本下的实现,当时使用_initialize方法初始化模块,现在的模块一般使用init()方法初始化模块。该信息的出现并不影响模型的使用。
您使用了use_gpu=True, 请确保设置了环境变量CUDA_VISIBLE_DEVICES环境变量,如CUDA_VISIBLE_DEVICES=0 python test.py。
如果还有报错,请继续提供详细的报错栈消息。

相关问题