davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++
http://dlib.net
Boost Software License 1.0
13.58k stars 3.38k forks source link

The 《Segmentation fault (core dumped) 》bug of import lasted dlib and pytorch #1394

Closed jianwu585218 closed 6 years ago

jianwu585218 commented 6 years ago

Hi,I got a trouble that when i import torch and the lasted dlib in linux , it will get《Segmentation fault (core dumped) 》error. I found that install dlib-19.8.1 in win10 will be fine. So I try to install 19.8.1 in linux ,after I download the dlib-19.8.1.tra.gz and use command:pip install dlib-19.8.1.tra.gz, it shows successfully install image But when i import dlib ,there is a new bug image Please help me,Thank you very much

davisking commented 6 years ago

Try the latest dlib version.

jianwu585218 commented 6 years ago

Thanks for your reply. I install the latest dlib version in the first . When i import the latest and torch in linux ,will get the 《Segmentation fault (core dumped) 》error. image I Install mang version , the dlib 19.8.1 with pytorch0.4 in other's machine is fine. So i want install dlib 19.8.1, but import dlib19.8.1,I get the error

jianwu585218 commented 6 years ago

the face_recognition use the dlib

davisking commented 6 years ago

Ok, well, you need to fill out the issue template and follow its instructions if you expect to get any help. In particular, include exactly what I can type starting from a clean ubuntu install to reproduce this problem.

wxy656 commented 6 years ago

l get the same problem when I use cuda 8.0 and cudnn7 ,while use cuda8.0 and cudnn6 ,the error is: Error while calling cudnnActivationForward(context(), relu_activation_descriptor(), &alpha, descriptor(src), src.device(), &beta, descriptor(dest), dest.device()) in file /opt/dlib-master/dlib/cuda/cudnn_dlibapi.cpp:1465. code: 9, reason: CUDNN_STATUS_NOT_SUPPOR

jianwu585218 commented 6 years ago

I slove it but i don't why. you should import face_recognition before torch,such as: image

ChiefGodMan commented 6 years ago

The command like this. @davisking

demo.py:

import dlib
import torch
# other code

$ python3 demo.py

Segmentation fault (core dumped)

davisking commented 6 years ago

Please read the issue submission instructions and follow them to submit a bug report.

sunguwei commented 6 years ago

I happened the same problem when I used the face detection function of dlib. Also follow the instruction above. I move the import dlib front of import torch. Amazing, it worked. Hope someone can tell the reason.

jianwu585218 commented 6 years ago

@sunguwei I don't konw the reason.Please tell me if you find the reason ,thank u

yushizhiyao commented 4 years ago

I slove it but i don't why. you should import face_recognition before torch,such as: image

same error , it works to me. Have you found the reason