[关闭]
@huangzhengsjtu 2015-05-22T08:49:14.000000Z 字数 1357 阅读 4078

安装Caffe

vision deepLearning


Caffe是Berkeley的一个深度学习框架,方便构造深度学习网络,并在GPU上运行。
安装过程按照Caffe的主页上的描述:http://caffe.berkeleyvision.org/install_apt.html

基本系统信息 Basic system information

使用Ubuntu Linux 14.04桌面版:

  1. ~$ uname -a
  2. Linux cis-ubuntu-1 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

需要安装的基础软件

caffe依赖BLAS等计算包, Boost 1.55以上,Opencv2.4以上。还有些包不太清楚是干什么的:glog(google认证用的?),hdf5(还可以用在hadoop的HDFS上?)。

直接用apt-get来安装:

  1. sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
  2. sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler

how to check?

安装Cuda

下载Cuda 7.0版本for Linux的deb文件,然后安装。

  1. wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb
  2. sudo dpkg -i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb

安装Caffe

  1. 从Githut下载caffe-master.zip. https://github.com/BVLC/caffe
  2. 解压缩,并且创建Makefile.config文件。
  1. unzip caffe-master.zip
  2. cd caffe-master
  3. cp Makefile.config.example Makefile.config
  1. 编辑Makefile.config
    例如: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. (现在没有GPU,所以我就使用CPU)

  2. Build

  1. make all
  2. make test
  3. make runtest
  4. [----------] Global test environment tear-down
  5. [==========] 651 tests from 115 test cases ran. (36247 ms total)
  6. [ PASSED ] 651 tests.

实际例子

下一步在一个具体的例子上运行caffe,就选流行的minist数据集吧。

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注