在安裝之前說(shuō)明下我的電腦配置
?Ubuntu14.04
?CUDA7.5
NVIDIA GT750Ti
主要參考鏈接是 https://github.com/weiliu89/caffe/tree/ssd 驱显,以下是步驟在其基礎(chǔ)上做的補(bǔ)充
?1.Get the code.
?git clone https://github.com/weiliu89/caffe.git
?cd caffe?
?git checkout ssd
2.Build the code.
?cp Makefile.config.example Makefile.config
?make -j8
?sudo vi ~/.bashrc? ?
加入你自己的caffe下的python路徑趟薄,我的是
?export PYTHONPATH=$PYTHONPATH:/home/xk/caffe/python
?source ~/.bashrc
?make py
?make test -j8?
?make runtest -j
Train參考https://github.com/weiliu89/caffe/tree/ssd注意例子訓(xùn)練是有預(yù)訓(xùn)練文件的
Test參考https://github.com/weiliu89/caffe/tree/ssd
3.Error Solution
1.error == cudaSuccess (10 vs. 0)? invalid device ordinal 屿良,解決辦法:設(shè)置好GPU? ? gpus = "0,1,2,3" 改為gpus = "0"02.error == cudaSuccess (2 vs. 0)? out of memory副渴,解決辦法:調(diào)小batchsize大小? ? batch_size = 1? ? accum_batch_size = 1
2.If you have multiple GPUs installed in your machine, make runtest might fail. If so, try following:
export CUDA_VISIBLE_DEVICES=0;
make runtest -j8
3.Ifyou have error: "Check failed: error == cudaSuccess (10 vs. 0)? invalid device ordinal",first make sure you have the specified GPUs, or try following if you have multiple GPUs:
unset CUDA_VISIBLE_DEVICES