设备信息:Ubuntu18.04,CUDA10.0.130,CUDNN7.3.0,Anaconda(python3.7.1),opencv3.4.0
一. 安装前准备工作:
1. 更新Linux系统软件
sudo apt-get update
2. 安装GitHub依赖包,可以使用git指令从GitHub下载
sudo apt-get install git cmake build-essential
3. 安装Caffe依赖包
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libatlas-base-dev liblapack-dev libopenblas-dev
sudo apt-get install python-dev python-opencv
sudo apt_get install libgflags-dev libgoogle-glog-dev liblmdb-dev
二. Installation
1. Get the code. We will call the directory that you cloned Caffe into $CAFFE_ROOT(即/home/usrname)
git clone http s://github.com/weiliu89/caffe.git
cd caffe
2. Modify Makefile.config according to your Caffe installation.
cp Makefile.config.example Makefile.config
3. 打开并修改Makefile.config (a lot of kengs)
vim Makefile.config
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB :&#