caffe编译 error及解决方案

编译环境:Windows + VS2013 + CUDA 8.0

问题一:Error 73  error MSB4062: The "NuGetPackageOverlay" task could not be loaded from the assembly D:\OpenSource\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll. Could not load file or assembly 'file:///D:\OpenSource\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll' or one of its dependencies. 系统找不到指定的文件。 Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.   

问题解决:‘系统找不到指定的文件’ 看起来像是路径问题,若检查路径发现没有问题,此处就是cudnn版本的问题。该caffe之前是编译成功的,但因安装tensorflow将cudnn版本改为v6了,重新下载cudnn v5.1版本,此类问题不再报错(cudnn v5测试不能解决以上问题)。

But, 因某原因重新编译时,该问题又又出现了,解决方法:clean+Rebuild

再改caffe源码之后重新编译以上方法都不行了,发现以管理员身份运行VS 或 cmd才是正解。

问题二:Error 8544  error MSB3073: The command ""\windows\scripts\BinplaceCudaDependenciies.cmd" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin" "" false true "D:\OpenSource\..\Build\x64\Debug\"  :VCEnd”已退出,代码为 1。 

问题解决:在使用cudnn加速的情况下,即<UseCuDNN>true</UseCuDNN>,CommonSettings.props 中<CuDnnPath></CuDnnPath>之间不要加路径,编译通过。

根据BinPlaceCudaDependencies.cmd中

if %USE_CUDNN% == true (
    echo BinplaceCudaDependencies : Copy cudnn*.dll to output.

    if "%CUDNN_PATH%" == "" (
         copy /y "%CUDA_TOOLKIT_BIN_DIR%\cudnn*.dll" "%OUTPUT_DIR%"
     ) else (
         copy /y "%CUDNN_PATH%\cuda\bin\cudnn*.dll" "%OUTPUT_DIR%"
     )
) else (
     echo BinplaceCudaDependencies : cuDNN isn't enabled.
) 

<CuDnnPath></CuDnnPath>之间加或不加路径都是可以的,已将cudnn复制到CUDA相应的文件夹下,是可以不加路径的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值