Step1:安装调试Caffe
基本信息:
-
Ubuntu 18.04
-
NVIDIA官网下载CUDA 10.0 ,Nvidia Driver 410.73 ,cudnn下载安装相对应版本就可以,安装教程不赘述。
下载caffe:
- Caffe在GitHub上源码下载:https://github.com/BVLC/caffe 解压后文件名是caffe-master,放在合适的位置
- 在anaconda中创建单独的环境,安装的是Python2.7,还需要安装在caffe-master/python/requirements.txt一些编译时会用到的包,caffe安装说明里有咖啡说明。或者说我们直接在anaconda环境中自己安装上也行。
# 激活anaconda中的环境变量,ff是你自己取得环境变量名。
source activate ff
# 再cd进入caffe-master目录下
cd caffe-master/
# 复制一下Makefile.config.example文件,去掉.cpnfig,这是因为编译的时候不能
# 识别出.example结尾的文件,之所以用.example,就是一个示例而已,需要我们自己根据实际电脑设置的环境做出改动。
cp Makefile.config.example Makefile.config
# 进入Makefile.config文件进行一些参数更改
vi 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 := 0
# USE_LMDB := 0
# This code is taken from https://github.com/sh1r0/caffe-android-lib
# USE_HDF5 := 0
# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1
# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3
# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
CUSTOM_CXX := g++
# CUDA directory contains bin/ and