Compilation

Now that you have the prerequisites, edit your Makefile.config to change the paths for your setup The defaults should work, but uncomment the relevant lines if using Anaconda Python.

cp Makefile.config.example Makefile.config
# Adjust Makefile.config (for example, if using Anaconda Python)
make all
make test
make runtest
  • For cuDNN acceleration, you should uncomment the USE_CUDNN := 1 switch in Makefile.config.
  • For CPU-only Caffe, uncomment CPU_ONLY := 1 in Makefile.config.

To compile the Python and MATLAB wrappers do make pycaffe and make matcaffe respectively. Be sure to set your MATLAB and Python paths in Makefile.config first!

Distribution: run make distribute to create a distribute directory with all the Caffe headers, compiled libraries, binaries, etc. needed for distribution to other machines.

Speed: for a faster build, compile in parallel by doing make all -j8 where 8 is the number of parallel threads for compilation (a good choice for the number of threads is the number of cores in your machine).

Now that you have installed Caffe, check out the MNIST tutorial and the reference ImageNet model tutorial.

CMake Compilation

In lieu of manually editing Makefile.config to configure the build, Caffe offers an unofficial CMake build thanks to @Nerei, @akosiorek, and other members of the community. It requires CMake version >= 2.8.7. The basic steps are as follows:

mkdir build
cd build
cmake ..
make all
make runtest

See PR #1667 for options and details.

Hardware

Laboratory Tested Hardware: Berkeley Vision runs Caffe with K40s, K20s, and Titans including models at ImageNet/ILSVRC scale. We also run on GTX series cards (980s and 770s) and GPU-equipped MacBook Pros. We have not encountered any trouble in-house with devices with CUDA capability >= 3.0. All reported hardware issues thus-far have been due to GPU configuration, overheating, and the like.

CUDA compute capability: devices with compute capability <= 2.0 may have to reduce CUDA thread numbers and batch sizes due to hardware constraints. Your mileage may vary.

Once installed, check your times against our reference performance numbers to make sure everything is configured properly.

Ask hardware questions on the caffe-users group.

Caffe 编译的更多相关文章

  1. ubuntu16.04, Matlab2016b caffe编译安装

    在Ubuntu上编译安装caffe还是个比较蛋疼的事,有时候会莫名其妙的碰到很多库的问题,这篇文章就把我在Ubuntu上编译安装caffe的过程和遇到的问题大致记录一下. 1.安装opencv htt ...

  2. caffe编译问题-src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory compilation terminated.

    错误描述 src/caffe/net.:: fatal error: hdf5.h: No such : recipe 操作过程 step1: 在Makefile.config文件更改INCLUDE_ ...

  3. 转 Windows+VS2013爆详细Caffe编译安装教程

    1. 安装cuda Cuda是英伟达推出的GPU加速运算平台 我这里安装的是cuda7.5,已经安装过的忽略,还没有安装过的这里有安装教程.windows下面安装还是非常简单的. 点击打开链接    ...

  4. caffe编译时候出现 undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'

    1.编译时候出现 make: * [.build_release/examples/siamese/convert_mnist_siamese_data.bin] Error 1 /usr/local ...

  5. caffe编译报错解决

    添加ssd中的一些层之后,编译报错: ../lib/libcaffe.so.1.0.0-rc5:对‘boost::match_results<__gnu_cxx::__normal_iterat ...

  6. caffe编译环境的错误:..build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: 没有那个文件

    在搭建caffe的环境时出现错误: .build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/aren ...

  7. 深度学习-Caffe编译测试的小总结

    1. 搭建的环境和代码:win7 64bit + vs2013+CUDA7.5 http://blog.csdn.net/thesby/article/details/50880802 2. 编译,制 ...

  8. 深度学习-Windows平台下的Caffe编译教程

    一.安装CUDA7.5 Cuda是英伟达推出的GPU加速运算平台 我这里安装的是cuda7.5,已经安装过的忽略,还没有安装过的这里有安装教程.windows下面安装还是非常简单的. https:// ...

  9. 【泡咖啡1】linux下caffe编译以及python环境配置手记

    caffe是一个深度学习的库,相信搞深度学习的话,不是用这个库就是用theano吧.要想使用caffe首先第一步就是要配置好caffe的环境.在这里,我主要说的是在debian的linux环境下如何配 ...

  10. Caffe 编译: undefined reference to imencode()

    本系列文章由 @yhl_leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/52150781 整理之前编译工程中遇到的 ...

随机推荐

  1. 关于ubuntu上执行错误命令报错

    Sorry, command-not-found has crashed! 新安装了一台ubuntu server 安装时用中文安装的,之后命令行下各种乱码,最后也不知道是修改哪里造成的 每次执行一次 ...

  2. AS3.0的动态类和密封类

    动态类:生成的实例可以在运行时动态添加属性和方法.类名前有dynamic就是动态类 密封类:生成的实例不可以在运行时动态添加属性和方法

  3. js 验证输入框金额

    $("#ipt1").keyup(function () { var reg = $(this).val().match(/\d+\.?\d{0,2}/); var txt = ' ...

  4. Sencha Touch Guide

     1.一些命令 创建APP #  Make sure the current working directory is the Sencha Touch 2 SDK 例如D:\Program File ...

  5. 用vld分析C++内存泄漏

    最近发现项目里有内存泄漏,到网上搜了一些资料,决定用vld来分析解决这个问题. 直接在vs里的"工具和扩展"中搜索vld,然后下载安装就可以了. 我下载下来的是个exe文件,安装在 ...

  6. LeetCode【第217题】Contains Duplicate

    题目: ''' Given an array of integers, find if the array contains any duplicates. Your function should ...

  7. c#中struct和class的区别 z

    1.struct 是值类型,class是对象类型 2.struct 不能被继承,class可以被继承 3.struct 默认的访问权限是public,而class默认的访问权限是private. 4. ...

  8. Entity Framework: 视图查询时重复返回第一行值, duplicate frst rows in resultset from a view

    http://blog.csdn.net/riverlau/article/details/7476449 1. 使用rownumber给view加上一个标示列 SELECT ROW_NUMBER() ...

  9. iOS Xcode制作模板类-b

    为什么要定义模板类 遵守代码规范可以提高代码可读性, 降低后期维护成本. 当我们定下了一个团队都认同的代码规范, 如我们要求所有的viewController的代码都得按照下面来组织: #pragma ...

  10. 设置UITextField的placeholder的颜色

    [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];