VS2013配置caffe,调用caffe库

使用VS2013配置caffe,前提是已经有编译好的caffe库。


(CPU、Release版)


1、新建VS2013工程,解决方案配置改为Release

2、项目右键->属性

3、在VC++目录->包含目录中,加入:


D:\caffe-master\include
D:\NugetPackages\boost.1.59.0.0\lib\native\include;
D:\NugetPackages\gflags.2.1.2.1\build\native\include;
D:\NugetPackages\glog.0.3.3.0\build\native\include;
D:\NugetPackages\OpenBLAS.0.2.14.1\lib\native\include;
D:\NugetPackages\OpenCV.2.4.10\build\native\include;
D:\NugetPackages\protobuf-v120.2.6.1\build\native\include;


4、在VC++目录->库目录中,加入:

D:\caffe-master\include
D:\NugetPackages\boost.1.59.0.0\lib\native\include;
D:\NugetPackages\gflags.2.1.2.1\build\native\include;
D:\NugetPackages\glog.0.3.3.0\build\native\include;
D:\NugetPackages\OpenBLAS.0.2.14.1\lib\native\include;
D:\NugetPackages\OpenCV.2.4.10\build\native\include;
D:\NugetPackages\protobuf-v120.2.6.1\build\native\include;

5、在链接器->输入->附加依赖项中,加入:

D:\caffe-master\include
D:\NugetPackages\boost.1.59.0.0\lib\native\include;
D:\NugetPackages\gflags.2.1.2.1\build\native\include;
D:\NugetPackages\glog.0.3.3.0\build\native\include;
D:\NugetPackages\OpenBLAS.0.2.14.1\lib\native\include;
D:\NugetPackages\OpenCV.2.4.10\build\native\include;
D:\NugetPackages\protobuf-v120.2.6.1\build\native\include;

6、C/C++ 预处理器中,添加: 

  

_SCL_SECURE_NO_WARNINGS;CPU_ONLY;

7、解决方案平台改为x64


8、配置完成,可输入以下代码测试:

    #include<iostream>
    #include<caffe/blob.hpp>
    using namespace caffe;
    using namespace std;
    int main()
    {
	Blob<float> blob1;
	cout << "Size : " << blob1.shape_string() << endl;
	blob1.Reshape(1, 2, 3,4);
	cout << "Size : " << blob1.shape_string() << endl;
	return 0;

    }


阅读更多
文章标签: Caffe 深度学习
个人分类: Caffe
想对作者说点什么? 我来说一句

libboost_date_time-vc120-mt-1_61.lib

2018年02月27日 791KB 下载

没有更多推荐了,返回首页

不良信息举报

VS2013配置caffe,调用caffe库

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭