caffe 安装方法和记录
1: 环境配置。I7-6700,显卡微星1060-3G,8G内存 centos7 虚拟机。
2: 依赖包:atlas3.10.3.tar.bz2 gflags-master.zip glog-0.3.3.tar.gz hdf5-1.8.18.tar.gz leveldb-master.zip lmdb-mdb.master.zip cmake-3.6.3,其中 atlas 安装方法为:
mkdir build cd build ../configure --shared make make install
然后修改Make.config, 增加内容
NCLUDE_DIRS :=/usr/include/opencv2 INCLUDE_DIRS :=/usr/local/atlas/include/ LIBRARY_DIRS :=/usr/local/atlas/lib/
编译时最好别选择make -j多线程编译,而是直接make ,不然容易报g++错误,可能原因为内存不足,最后编译成功界面如下:
[gzw@localhost caffe-master]$ make LD -o .build_release/lib/libcaffe.so.1.0.0-rc3 CXX tools/caffe.cpp CXX/LD -o .build_release/tools/caffe.bin CXX tools/compute_image_mean.cpp CXX/LD -o .build_release/tools/compute_image_mean.bin CXX tools/convert_imageset.cpp CXX/LD -o .build_release/tools/convert_imageset.bin CXX tools/device_query.cpp CXX/LD -o .build_release/tools/device_query.bin CXX tools/extract_features.cpp CXX/LD -o .build_release/tools/extract_features.bin CXX tools/finetune_net.cpp CXX/LD -o .build_release/tools/finetune_net.bin CXX tools/net_speed_benchmark.cpp CXX/LD -o .build_release/tools/net_speed_benchmark.bin CXX tools/test_net.cpp CXX/LD -o .build_release/tools/test_net.bin CXX tools/train_net.cpp CXX/LD -o .build_release/tools/train_net.bin CXX tools/upgrade_net_proto_binary.cpp CXX/LD -o .build_release/tools/upgrade_net_proto_binary.bin CXX tools/upgrade_net_proto_text.cpp CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin CXX tools/upgrade_solver_proto_text.cpp CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin CXX examples/cifar10/convert_cifar_data.cpp CXX/LD -o .build_release/examples/cifar10/convert_cifar_data.bin CXX examples/cpp_classification/classification.cpp CXX/LD -o .build_release/examples/cpp_classification/classification.bin CXX examples/mnist/convert_mnist_data.cpp CXX/LD -o .build_release/examples/mnist/convert_mnist_data.bin CXX examples/siamese/convert_mnist_siamese_data.cpp CXX/LD -o .build_release/examples/siamese/convert_mnist_siamese_data.bin