Caffe深度學習入門(4)——Ubuntu16.04 + CUDA9.1+cudnn7.5 + opencv3.3.1+python3.5+caffe安裝參考博客和跳坑筆記

Caffe深度學習入門——Ubuntu16.04 + CUDA9.1+cudnn7.5 + opencv3.3.1+python3.5+caffe安裝參考博客和跳坑筆記

Ubuntu16.04 + CUDA9.1+cudnn7.5 + opencv3.3.1+python3.5+caffe安裝參考筆記

Ubuntu16.04 Caffe 安裝步驟記錄(超詳盡)
http://blog.csdn.net/baobei0112/article/details/77996369

還可參考:
Ubuntu 16.04 安裝配置Caffe 圖文詳解
http://www.linuxidc.com/Linux/2016-12/138870.htm?_t_t_t=0.9861765928786057

虛擬機下配置 好用:
https://www.2cto.com/kf/201702/597101.html

安裝setuptools
http://www.linuxidc.com/Linux/2017-03/142335.htm

好用

http://www.jb51.net/article/118039.htm

https://www.2cto.com/kf/201702/597101.html

4321
caffe訓練測試mnist數據集

http://blog.csdn.net/fx409494616/article/details/53008971
淺談caffe中train_val.prototxt和deploy.prototxt文件的區別

用訓練好的caffe model 來進行分類
https://www.cnblogs.com/denny402/p/5111018.html

Ubuntu 16.04遠程登錄服務器–ssh的安裝和配置
http://blog.csdn.net/cs_mary/article/details/54728906

https://jingyan.baidu.com/article/86fae346d246073c48121a40.html
ssh遠程登陸linux系統

caffe在ubuntu16.04配置流程
http://blog.csdn.net/umke888/article/details/54864022

Ubuntu16.04部署python2和python3共存的Jupyter Notebook
https://www.cnblogs.com/v5captain/p/6688494.html、

調用caffemodel 來分類
https://www.cnblogs.com/denny402/p/5111018.html

編譯 pycaffe時報錯:fatal error: numpy/arrayobject.h沒有那個文件或目錄:
解決:sudo apt-get install python-numpy
然後 make pycaffe

import skimage.io ImportError: No module named skimage.io(編譯pycaffe報錯)
原因是少了東東:沒有安裝所謂的skimage.io 模塊,所以可以用以下的命令來安裝:

  1. sudo pip install scikit-image
    2.sudo apt-get install python-skimage
    以上兩種方式任選一個命令輸入安裝好這個包即可。

import caffe 報錯:UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xef in position 6: ordinal not in range(128)
http://dacoolbaby.iteye.com/blog/2035125

對需要 str->unicode 的代碼,可以在前邊寫上
import sys
reload(sys)
sys.setdefaultencoding(‘utf8′)
把 str 編碼由 ascii 改爲 utf8 (或 gb18030)

python中import caffe提示no module named google.protobuf.internal
回到終端,重新裝下protobuf
Pip install protobuf
然後進入調用,就可以了。
cd ~/caffe/python
python
import caffe

編譯caffe下的mnist數據報錯
linux Error parsing text-format caffe.SolverParameter: 32:12: Message type “caffe.SolverParameter” has no field named “Solver_mode”.
原因:由於修改lenet_solver.prototxt文件時,多打了幾行空格,且solver_mode不小心改成了Solver_mode,修改回來即可完好運行。

create_cifar10.sh 轉換cifar10數據集時報錯: Check failed: data_file Unable to open train file #2
解決方案:下載的cifar10數據集,linux下自動解壓縮時壓縮錯誤,少了幾個batch文件造成的數據不完整。可以手動解壓縮,保證有6個大小爲30010kb大小的數據bin文件,放到指定位置上,然後重新運行create_cifar10.sh 。

這裏寫圖片描述

服務器下:
Import caffe 報錯:
Traceback (most recent call last):
File “”, line 1, in
File “caffe/init.py”, line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File “caffe/pycaffe.py”, line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: No module named _caffe
解決方案:重新make pycaffe

Ubuntu16.04+CUDA9.1+cudnn 7.05 +caffe+python2.7
Make runtest 時報錯
F1225 02:30:28.969661 11193 cudnn_softmax_layer.cpp:15] Check failed: status == CUDNN_STATUS_SUCCESS (4 vs. 0) CUDNN_STATUS_INTERNAL_ERROR

解決方案:
(1):
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
這個方法對我來說不管用,還是之前的錯誤;

(2):執行 sudo rm -f ~/.nv 解決問題

參考:https://github.com/tensorflow/tensorflow/issues/6698
(3)顯卡被佔用。剛剛用syder跑了一下tensorflow,顯卡被佔用了沒關,我關掉spyder就好了

F1225 02:53:47.183087 12262 math_functions.cu:130] Check failed: status == CUBLAS_STATUS_SUCCESS (1 vs. 0) CUBLAS_STATUS_NOT_INITIALIZED

Jupyter運行時出現下面的錯誤:Unexpected error while saving file: arma/Untitled.ipynb [Errno 13] Permission denied:
jupyter notebook 權限不允許的解決方案
blog.csdn.net/u014497625/article/details/76549220

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章