(4)安装git,并且下载代码
sudo apt-get install git
git clone https://github.com/BVLC/caffe.git
然后进入到源码目录
cd caffe
(5)编译Caffe
cp Makefile.config.example Makefile.config
然后修改Makefile.config设置你的python的路径和matlab的路径
注意:-j8表示使用多核进行编译,8是核心个数
make all -j8
make test -j8
make runtest
如果要编译python的绑定(你要安装好python及其依赖)
make pycaffe -j8
如果要编译matlab的绑定(你要安装好matlab)
sudo apt-get install git
git clone https://github.com/BVLC/caffe.git
然后进入到源码目录
cd caffe
(5)编译Caffe
cp Makefile.config.example Makefile.config
然后修改Makefile.config设置你的python的路径和matlab的路径
注意:-j8表示使用多核进行编译,8是核心个数
make all -j8
make test -j8
make runtest
如果要编译python的绑定(你要安装好python及其依赖)
make pycaffe -j8
如果要编译matlab的绑定(你要安装好matlab)
make matcaffe -j8
3.3 修改环境路径
在~/.bashrc中添加内容如下:
#caffe
export PYTHONPATH=$PYTHONPATH:/home/'username'/usr/caffe/python
输入source ~/.bashrc,使配置生效。
测试:
python
import caffe