ubuntu下的caffe安装

来源:互联网 发布:无印良品淘宝旗舰店 编辑:程序博客网 时间:2024/05/16 01:12

参考文档http://www.linuxidc.com/Linux/2016-09/135034.htm主要参考


http://blog.csdn.net/muzilinxi90/article/details/53673184


遇到的问题:  1、先要更新:sudo apt-get update,sudo apt-get upgrade

2、

第二部分: 安装CAFFE
到CAFFE文件夹, 使用模板写个Makefile.config. 具体就是先复制一下模板, 再改一些内容(我喜欢用EMACS).
cp Makefile.config.example Makefile.config
-因为CPU MODE, 所以在CPU_ONLY := 1前面的#要去掉.
-两个路径要改成这样:(添加后面的两个hdf5的路径, 否则编译时报hdf5错误)
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

这个部分路径要改成
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/lib/x86_64-linux-gnu/hdf5/serial


这个# NOTE: this is required only if you will compile the python interface.  # We need to be able to find Python.h and numpy/arrayobject.h. 
PYTHON_INCLUDE := /usr/include/python2.7 \     /usr/local/lib/python2.7/dist-packages/numpy/core/include 也要改。

原创粉丝点击