Ubuntu16.04安装IntelCaffe(根据官方文档)

来源:互联网 发布:中国家居建材 知乎 编辑:程序博客网 时间:2024/05/29 08:09
  1. 安装需要的包或依赖项
PrerequisiteUbuntu 16.04Open a Terminal windowsudo apt-get updatesudo apt-get install build-essential cmake git pkg-configsudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-devprotobuf-compilersudo apt-get install libatlas-base-devsudo apt-get install --no-install-recommends libboost-all-devsudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-devsudo ARTIFICIAL INTELLIGENCE apt-get install libopencv-dev
  1. 下载intelcaffe
Downloadgit clone https://github.com/intel/caffe.git
  1. Build
BuildGo to Caffe root directory.cp Makefile.config.example Makefile.configvi Makefile.config (add the red part)INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serialLIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/usr/lib/x86_64-linux-gnu/hdf5/serialmake all –j4
  1. 测试是否成功~
//Train & Test//Get MNIST data set  获取MNIST数据集./data/mnist/get_mnist.sh./examples/mnist/create_mnist.sh//Training   训练./build/tools/caffe train --solver=examples/mnist/lenet_solver.prototxt//Test   测试./build/tools/caffe test –model examples/mnist/lenet_train_test.prototxt –weightsexamples/mnist/lenet_iter_10000.caffemodel –iterations 100
原创粉丝点击