【caffe】VS2015下caffe配置(GPU版)——【caffe学习一】

来源:互联网 发布:naca64 618翼型数据 编辑:程序博客网 时间:2024/05/21 12:08

1。环境准备

环境:

win10 x64

VS2015

cuda8.0 x64 (https://developer.nvidia.com/cuda-downloads)

cudnn5.1 x64(http://download.csdn.net/download/u012223520/9683325#comment)

python2.7 x64(https://www.python.org/downloads/release/python-2714/)

cmake3.10(https://cmake.org/download/)


其中cudnn5.1配置方法参照:

直接将下载到的cudnn5.1解压,将文件夹下bin,include,lib分别放入cuda目录,即 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0

Use cuDNN

To use cuDNN the easiest way is to copy the content of the cuda folder into your CUDA toolkit installation directory. For example if you installed CUDA 8.0 and downloaded cudnn-8.0-windows10-x64-v5.1.zip you should copy the content of the cuda directory to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0


2。安装caffe

以上环境配置完成后,开始下载caffe

如果没有安装git(https://git-scm.com/download/win),需要先下载安装

安装完成后,在命令行下输入:

git clone https://github.com/BVLC/caffe.gitcd caffegit checkout windows:: Edit any of the options inside build_win.cmd to suit your needsscripts\build_win.cmd


遇到错误,找不到Ninja,需要修改scripts/build_win.cmd文件,同时删除scripts/build/CMakeCache.txt(如果存在该文件的话)




修改完成后,运行build_win.cmd



如果成功找到cuda和cudnn会输出这样


否则输出


运行结束后,在scripts/build下找到Caffe.sln用VS2015打开,选择release x64,ALL_BUILD 生成(如果出现error MSB3073: 再次点ALL_BUILD重新生成),

最后在build/tools/Release目录中生成: