caffe环境配置
来源:互联网 发布:淘宝店描述怎么写范例 编辑:程序博客网 时间:2024/05/16 13:05
本文所用系统为Ubuntu16.04 32bit,主要解决在完成《21天caffe实战》那本书的基本配置(仅CPU)之后仍然存在的一些问题。
一.命令行提示 not found cblas.h
具体:
将blas和cblas安装文件下载,此处百度即可不用翻墙
1. 编译blas,进入BLAS目录执行下面的命令make
2. 编译cblas,进入CBLAS目录,首先根据自己的操作系统平台,将某个Makefiel.XXX复制为Makefile.in,XXX表示操作系统。
如果是Linux,那么就将Makefile.LINUX 复制为 Makefile.in。
注:# 号表示注释,请不要将其输入= =
cp ../BLAS/libblas.a testing # 将上一步编译成功的 libblas.a 复制到 CBLAS目录下的testing子目录
make # 编译所有的目录
此时会在CBLAS安装目录下的lib目录中产生一个静态链接库文件cblas_LINUX.a,这个库文件和上面得到的libblas.a文件就是我们所需要的。另外还需要的就是CBLAS/include中的cblas.h头文件。将三个文件全部拷贝到,你需调用的应用程序源码目录中。
拷贝到路径下:
cp include/cblas.h /usr/include/
cp lib/cblas_LINUX.a /usr/local/libcblas.a
cp testing/libblas.a /usr/local/lib
二.经过以上修改,再次编译,此时应报错:src/caffe/layers/hdf5_data_layer.cpp:13:18: fatal error: hdf5.h: No such file or directory #include "hdf5.h"
此时第一个问题已不再报错。
解决方法:
在Makefile.config文件的第85行,添加 /usr/include/hdf5/serial/ 到 INCLUDE_DIRS,也就是把下面第一行代码改为第二行代码。
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
在Makefile文件的第173行,把 hdf5_hl 和hdf5修改为hdf5_serial_hl 和 hdf5_serial,也就是把下面第一行代码改为第二行代码。
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
- caffe环境配置
- caffe环境配置
- Caffe-windows 环境配置
- caffe Python 环境配置
- CAFFE环境配置教程
- linux caffe环境配置
- Caffe 环境配置
- codeblocks配置caffe环境,调用caffe模型
- Caffe全环境配置备忘录
- centos服务器配置caffe环境
- caffe python+matlab环境配置
- caffe环境配置+ubuntu14.04
- caffe第一步,配置VS2015环境。
- VS2013配置Caffe开发环境
- caffe学习(5)------caffe for ubuntu环境配置
- Caffe开发(1):Ubuntu 16.04环境下caffe配置
- Windows10+Caffe+CUDA7.5+VS2013环境配置
- Windows10+Caffe+CUDA7.5+VS2013环境配置
- autorelease基本使用
- Linux 字符设备驱动结构(三)—— file、inode结构体及chardevs数组等相关知识解析
- LeetCode_003 Longest Substring Without Repeating Characters(greedy)
- Gitlab - 如何解決 "No authentication methods configured on login page" ? (gitlab version : 8.11.2)
- springMVC的配置
- caffe环境配置
- mybatis详解(一)
- preg_match、preg_match_all使用注意点
- iOS开发之 WKWebVeiw使用
- Python Debug
- 欧拉计划 8
- 使用Eclipse的maven构建一个web项目
- hdu题目分类
- [Leetcode] Isomorphic Strings