ubuntu下caffe編譯錯誤彙總

2021-09-25 11:28:29 字數 1488 閱讀 1389

題記:林林總總,編譯了不下十次,安裝系統,配顯示卡,驅動,cuda,cudnn也不下於七八次,每次都會有相同或者不同的錯誤,之前一直偷懶沒有記錄,導致每次都要重新搜,實為不便,在此記錄,回憶到就更。。。

1.編譯caffe,在make all的時候報錯:

caffe /usr/bin/ld: 找不到 -lopenblas
此處的錯誤是缺少openblas庫,也許缺少的庫型別不同,但是格式一般都是類似「-l***x」,此時直接對「***x」進行安裝即可。

sudo apt-get install lib***x-dev
然後重新make clean,再make all;

2.check failed: status == cudnn_status_success (8 vs. 0)  cudnn_status_execution_failed

這一步是在runtest時候發生的,主要原因應該是cudnn版本的問題,但是都到這一步了,也沒有去更新版本,直接把make.file裡面的use_cudnn=1給注釋掉即可,再進行編譯即可。

但是這樣並沒有真正解決,因為沒有cudnn加速,caffe會跑得比較慢,知其然更要知其所以然嘛,網上的說法如下:

(1)簡單講就是gpu的加速效能不夠,cudnn只支援cuda capability 3.0以上的gpu加速:我這裡應該不是這個原因,我的顯示卡1660timq,雖然是1660ti閹割的,但是效能理論上比1060好?不過nvidia官網好像沒有指出1660ti可以使用cudnn加速,我不禁陷入了沉思,這難道是一台貨真價實的遊戲本?

可以用筆記本跑深度學習嗎

(2)cudnn版本,個人因為這個是主要原因,可以把版本降一兩級,重新安裝。

3.no module named skimage.io

小錯誤,(1)安裝skimage依賴庫,python-skimage包依賴於matplotlib,scipy,pil,numpy和six。

先安裝依賴庫

sudo apt-get install python-matplotlib python-numpy python-pil python-scipy

sudo apt-get install build-essential cython

再安裝skimage包:

sudo apt-get install python-skimage

(2)更新skimage版本:

pip install scikit-image --upgrade
4.importerror: no module named google.protobuf.internal

小錯誤:安裝python介面:sudo apt-get install python-protobuf

5.no module named _caffe

spyder:no module named _caffe(附加caffe編譯報錯解釋)

caffe編譯錯誤總結

問題1 fatal error hdf5.h 沒有那個檔案或目錄 在makefile.config檔案,新增 usr include hdf5 serial 到 include dirs,也就是把下面第一行 改為第二行 include dirs python include usr local in...

Caffe編譯錯誤整理

今天編譯caffe ssd遇到編譯錯誤 1 line 9690 3 e github caffe ssd windows src caffe layer factory.cpp 141 error c2061 syntax error identifier slicelayer 2 line 969...

caffe for Windows下的編譯錯誤

當你在maincaller下編譯出現如下所示的錯誤的時候,或者遇到r6010 abort has been called的時候,把debug模式改為release模式,試一下哦 試一下下面的轉換,把debug改為release 在訓練cifar10的時候,在計算均值檔案後,訓練網路前,要先編譯一下t...