A guidance to install caffe with python2.7 on UBuntu 16.04
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
sudo apt-get install python-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo pip install numpy
sudo pip install scikit-image
sudo pip install protebuf
Please pay attention to PYTHON_INCLUDE and INCLUDE_DIRS in Makefile.config & LIBRARIES in Makefile
sudo touch /usr/local/lib/python2.7/dist-packages/mypkg.pth
edit mypkg.pth, input CAFFE_HOME/python
-
官方install:
-
在官方install前需要处理依赖 & 常见的安装错误及解决方法:
-
在Makefile.config的配置:
http://blog.csdn.net/espace_2009/article/details/43604591
其中,根据注释可以自己调整,比如加入matlab、nccl支持等
-
hdf5:(Makefile, not Makefile.config)
-
pycaffe配置:
http://blog.csdn.net/zhangjunhit/article/details/73740402
pip install protobuf
-
为Python添加默认模块搜索路径:CAFFE_HOME/python
-
nccl(用于多核训练):
http://www.nvidia.cn/object/caffe-installation-cn.html
nccl共享库的问题:
-
多核训练时使用的参数: