MatConvNet1.0bate25+win10+vs2015+matlab2017a GPU编译踩坑

MatConvNet1.0bate25+win10+vs2015+matlab2017a GPU编译踩坑

开头按照下边这个搞,不出意外的话直接成功。(但一般会出意外----狗头表情)

matconvnet安装、编译、配置 - 知乎 (zhihu.com)

完了之后编译GPU的时候报这个错:(编译的过程会有大量warning这个不用管)

error: …\Windows Kits\8.1\Include\um\combaseapi.h “IUnknown” is undefined

解决办法:在Windows Kits\8.1\Include\um\combaseapi.h文件中添加一行 interface IUnknown;

interface IUnknown;// ADD THIS LINE HERE

extern"C++"

{

template_Post_equal_to_(pp)_Post_satisfies_(return== pp)void** IID_PPV_ARGS_Helper(T** pp)

{

#pragma prefast(suppress:6269,"Tool issue with unused static_cast")

static_cast(*pp);// make sure everyone derives from IUnknown

returnreinterpret_cast(pp);

}

}

完了之后又报这个错:
MatConvNet1.0bate25+win10+vs2015+matlab2017a GPU编译踩坑_第1张图片

在506行删掉一个&, 改成这样
if strcmp(arch, ‘win64’) & (opts.enableCudnn)

重新编译即可。

大功告成!下方是官网教程

安装 - MatConvNet (vlfeat.org)

你可能感兴趣的:(Matlab,CUDA,c++,MatConvNet,matlab)