一、简介
Caffe,全称Convolutional Architecture for Fast Feature Embedding。
Caffe是一个深度学习框架。
查看项目网站了解所有详细信息:http://caffe.berkeleyvision.org/
二、编译
Caffe依赖protobuf
注:如果Caffe要和tensorflow一起使用,需要调整依赖项版本:要基于protobuf-3.6.0版本来编译Caffe才行。
1.protobuf 编译
protobuf依赖boost
注:如果Caffe要和tensorflow一起使用,则要基于boost1.58版本来编译protobuf才行。
# 使用apt安装boost1.58
$ sudo apt install libboost1.58-dev
GitHub地址:https://github.com/protocolbuffers/protobuf
我下载的3.6.0版本:https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-all-3.6.0.tar.gz
解压并进入protobuf-3.6.0:
# 依赖项
$ sudo apt-get install autoconf automake libtool curl make g++ unzip
# 编译
$ cd protobuf-3.6.0
$ ./autogen.sh
$ ./configure
$ make -j12
$ make check # 如果“make check”失败,您仍然可以安装,但该库的某些功能可能无法在您的系统上正常运行。
# 安装
$ sudo make install
$ sudo ldconfig # refresh shared libr