1.下载caffe-ssd

cd ssd # ssd是一个空的文件
git clone https://github.com/weiliu89/caffe.git
cd caffe
git checkout ssd #检查分支

2.编译前准备:Makefile.config

cp Makefile.config.example Makefile.config

不谈版本的编译都不是好编译!!

Python3.5+cudnn6.0.21+cuda8.0.61+opencv3.30

打开Makefile.config:

USE_CUDNN := 1 
OPENCV_VERSION := 3 
CUDA_DIR := /usr/local/cuda 
CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \
 -gencode arch=compute_35,code=sm_35 \
 -gencode arch=compute_50,code=sm_50 \
 -gencode arch=compute_52,code=sm_52 \
 -gencode arch=compute_60,code=sm_60 \
 -gencode arch=compute_61,code=sm_61 \
 -gencode arch=compute_61,code=compute_61 
BLAS := atlas 
PYTHON_LIBRARIES := boost_python-py35 python3.5m 
PYTHON_INCLUDE := /usr/include/python3.5m \ /usr/lib/python3.5/dist-packages/numpy/core/include \ /usr/local/lib/python3.5/dist-packages/numpy/core/include 
PYTHON_LIB := /usr/lib 
WITH_PYTHON_LAYER := 1 
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial
USE_NCCL := 1 
BUILD_DIR := build 
DISTRIBUTE_DIR := distribute 
TEST_GPUID := 0 Q ?= @

打开Makefile:修改

# 181 行
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

# 266 行
LIBRARIES += boost_thread stdc++ boost_regex

2.编译:

make all -j8
make runtest -j8
make pycaffe -j8

我make all 编译之后,其实还是有问题,Makefile 619/624之类:

但我导师说没问题的,并且运行了

>>sudo make
make: Nothing to be done for 'all'.

如图:

编译就结束了!

3.训练

 

 

 

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐