CCPD icon indicating copy to clipboard operation
CCPD copied to clipboard

No module named 'torch._thnn'

Open niushaoda opened this issue 5 years ago • 15 comments

No module named 'torch._thnn'

niushaoda avatar Nov 18 '19 08:11 niushaoda

I have the same issue.

nicpho avatar Nov 21 '19 08:11 nicpho

you need to use cuda9.x

beibuwandeluori avatar Jan 02 '20 16:01 beibuwandeluori

I have the same problem, and my cuda version is 9.0.176, have you solved the problem?

Hunandaxueheying avatar Feb 25 '20 08:02 Hunandaxueheying

Sorry, I haven't solved the problem yet.

---Original--- From: "Hunandaxueheying"<[email protected]> Date: Tue, Feb 25, 2020 16:47 PM To: "detectRecog/CCPD"<[email protected]>; Cc: "Subscribed"<[email protected]>; Subject: Re: [detectRecog/CCPD] No module named 'torch._thnn' (#57)

I have the same problem, and my cuda version is 9.0.176, have you solved the problem?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Panruihua avatar Feb 25 '20 10:02 Panruihua

No module named 'torch._thnn'

I am also getting the same problem. I am using the latest versions of pytorch, numpy, cv2 and CUDA. Is it mandatory to use the specified versions of above mentioned items? did you solve the problem?

Thanks

Harsha-1729 avatar Mar 24 '20 11:03 Harsha-1729

No module named 'torch._thnn'

I am also getting the same problem. I am using the latest versions of pytorch, numpy, cv2 and CUDA. Is it mandatory to use the specified versions of above mentioned items? did you solve the problem?

Thanks

I have solved the problem.

I tried installing pytorch(0.3.1) and run the code on Google Colab. It successfully executed and the results were generated.

Harsha-1729 avatar Mar 27 '20 19:03 Harsha-1729

Sorry, I haven't solved the problem yet. ---Original--- From: "Hunandaxueheying"<[email protected]> Date: Tue, Feb 25, 2020 16:47 PM To: "detectRecog/CCPD"<[email protected]>; Cc: "Subscribed"<[email protected]>; Subject: Re: [detectRecog/CCPD] No module named 'torch._thnn' (#57) I have the same problem, and my cuda version is 9.0.176, have you solved the problem? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Following procedure worked for me

I tried installing pytorch(0.3.1) and run the code on Google Colab. It successfully executed and the results were generated.

Harsha-1729 avatar Mar 27 '20 19:03 Harsha-1729

I have the same problem, and my cuda version is 9.0.176, have you solved the problem?

Following procedure worked for me

I tried installing pytorch(0.3.1) and run the code on Google Colab. It successfully executed and the results were generated.

Harsha-1729 avatar Mar 27 '20 19:03 Harsha-1729

same issue here

LorenzoLamberti94 avatar Apr 16 '20 17:04 LorenzoLamberti94

same issue here

I tried installing pytorch(0.3.1) and run the code on Google Colab. It successfully executed and the results were generated.

Harsha-1729 avatar Apr 17 '20 23:04 Harsha-1729

I can't even install pytorch 0.3.1 with pip or conda (not supported anymore). I used pytorch 0.4.1 + cuda 9 and fortunately worked for me

Detailed istructions: conda create --name rpnet python=3.6 conda activate rpnet conda install pytorch=0.4.1 cuda90 -c pytorch conda install opencv pip install imutils

LorenzoLamberti94 avatar Apr 20 '20 08:04 LorenzoLamberti94

the same issue,maybe the OS have not the version(0.3.1),reference(https://pytorch.org/get-started/previous-versions/). only mac OS has 'torch-0.3.1-cp27-none-macosx_10_7_x86_64.whl',

MAR-ZLW avatar Oct 26 '20 08:10 MAR-ZLW

@LorenzoLamberti94 thanks, it works. After that, we also need to change "type(input)" to "input.type()" in the line 18 of "roi_pooling.py".

chensonglu avatar Nov 09 '20 08:11 chensonglu

@LorenzoLamberti94 thanks, it works. After that, we also need to change "type(input)" to "input.type()" in the line 18 of "roi_pooling.py".

thanks for the "roi_pooling.py" patch. My steps: conda create --name rpnet python=3.6 conda activate rpnet conda install opencv pip install imutils pip install torch-0.4.1-cp36-cp36m-linux_x86_64.whl the "roi_pooling.py" patch

Finally, it works well! Thanks for @LorenzoLamberti94 and @chensonglu

dwchen-tech avatar Nov 13 '20 08:11 dwchen-tech

requirement: numpy==1.21.0 opencv-python==3.4.2.17 torch==1.9.0 torchaudio==0.9.0 torchvision==0.10.0

CUDA:10.2 CUDNN:7.x

revision should be made accorading to https://github.com/872699467/CCPD_CNN

Solved!

StevenVerne avatar Jul 12 '21 14:07 StevenVerne