一、在windows下面搭建caffe环境
1、默认已经安装好visual studio,我安装的是vs2013
2、配置caffe包含下面几步:
(1)下载cuda+cudnn,链接:
cuda链接:https://developer.nvidia.com/cuda-downloads
cudnn下载链接:https://developer.nvidia.com/cudnn
其中cuda是可以直接使用gpu的计算架构,cudnn是用于深度神经网络的gpu加速库。
注意选择默认安装路径,后面配置会容易一点,不用定义cuda路径
(2)在git上下载已经编译好的caffe源码,连接:https://github.com/Microsoft/caffe
(3)确保vs已经安装了nugetpackage,解压caffe源码在文件下windows打开caffe.sln之后会自动帮你下载好所依赖的一些库,放在同目录文件下NugetPackages下
(4)windows文件夹下拷贝一份CommonSettings.props.example并把备份文件改名为CommonSettings.props,修改CommonSettings.props的文件中的值,结合自己的配置路径设置,我的设置如下:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<BuildDir>$(SolutionDir)..\Build</BuildDir>
<!--NOTE: CpuOnlyBuild and UseCuDNN flags can't be set at the same time.-->
<CpuOnlyBuild>false</CpuOnlyBuild>//使用gpu时改为false
<UseCuDNN>true</UseCuDNN>
<CudaVersion>7.5</CudaVersion>//设置cuda版本
<!-- NOTE: If Python support is enabled, PythonDir (below) needs to be
set to the root of your Python installation. If your Python installation
does not contain debug libraries, debug build will not work. -->
<PythonSupport>false</PythonSupport>
<!-- NOTE: If Matlab support is enabled, MatlabDir (below) needs to be
set to the root of your Matlab installation. -->
<MatlabSupport>false</Matla