基于chyh1990/caffe-compact在windows vs2013上编译caffe步骤
1.??????從https://github.com/chyh1990/caffe-compact下載caffe-compact代碼;
2.??????通過CMake(cmake-gui)生成vs2013 x64 caffe工程;
3.??????從https://github.com/google/protobuf下載ProtoBuf,解壓縮,編譯ProtoBuf:
(1)、打開cmake-gui,source code路徑:E:/GitCode/Caffe/src/thirdparty/ProtoBuf/protobuf-master/cmake和build thebinaries路徑:E:/GitCode/Caffe/src/thirdparty/ProtoBuf/vs2013;
(2)、點擊Configure,選擇Visual Studio 12 2013 Win64;
(3)、去掉BUILD_TESTING的勾選,將CMAKE_INSTALL_PREFIX設置為E:/GitCode/Caffe/src/thirdparty/ProtoBuf/install,再次點擊Configure;
(4)、點擊Generate,生成vs2013 protobuf.sln工程;
(5)、打開protobuf.sln工程,分別在x64 Debug和x64 Release下,點擊ALL_BUILD,重新生成;點擊INSTALL,生成;手動拷貝生成的庫和頭文件放在/install/include和/install/lib目錄下,將protoc.exe放在/install/bin目錄下;
(6)、將/install/include目錄加入到caffe工程中;
4.??????通過ProtoBuf中的protoc.exe重新生成caffe.pb.h和caffe.pb.cc:
(1)、打開命令提示符,將protoc.exe拷貝到/caffe-compact-master/src/caffe/proto目錄下,執行:protoc.execaffe.proto --cpp_out=./ ;
(2)、將生成的caffe.pb.h文件拷貝到/caffe-compact-master/include/caffe/proto目錄下;
5.??????按照http://blog.csdn.net/fengbingchun/article/details/47378515將Eigen加入到caffe工程中;
6.??????分別在Debug和Release下,點擊ALL_BUILD,編譯生成caffe-compact.lib靜態庫。
總結
以上是生活随笔為你收集整理的基于chyh1990/caffe-compact在windows vs2013上编译caffe步骤的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: UTF-8 CPP的使用
- 下一篇: Windows7上使用VS2013编译C