1. Configure the Environment
1. This article compiles in the windows7+vs2013 environment, CUDA version 8.0,CUDNN version 5.1
2. Cuda Download Address: https://developer.nvidia.com/cuda-toolkit,cudnn:cudnn-8.0-windows7-x64-v5.1 Download Address: https:// Developer.nvidia.com/cudnn
3. Install CUDA8.0 (required after vs2013 installation)
4. Unzip the downloaded CUDNN package and copy the files to the include, Bin, and Lib directories under the Cuda folder 2. To compile the GPU version of SSD
1. After the last compilation of successful CPU version, configure Commonsettings.props
[HTML] View plain copy <CpuOnlyBuild>false</CpuOnlyBuild> <UseCuDNN>true</UseCuDNN> <cuda Version>8.0</cudaversion> In addition, my cudaarchitecture is as follows:
[HTML] View plain copy <CudaArchitecture>compute_35,sm_35;compute_52,sm_52</CudaArchitecture>
2. Compile Libcaffe, error: Dtype expval = exp (min (in_data[index), Dtype (Kbnll_threshold)); modify Bnll_layer.cu as follows: [HTML] View plain C opy Dtype expval = exp (min (in_data[index), Dtype (52))); Dtype (52) This side according to their own graphics card calculation ability to fill in.
3. Add all CU documents under Layers,solve and Util respectively under the CU catalogue of the works (layers except roi_pooling_layer.cu)
4. Modify BBOX_UTIL.CU, comment out all statements with thrust
5. Modify DETECTION_OUTPUT_LAYER.CU and Detection_output_layer.cpp files and comment out all regex and RV statements
[HTML] View plain copy//boost::regex exp ("\" (null|true|false|-?[ 0-9]+ (\\.[ 0-9]+)? \"");
[HTML] View plain copy//std::string RV = Boost::regex_replace (Ss.str (), exp, "$"); outfile << rv.substr (Rv.find ("["), Rv.rfind ("]")-Rv.find ("["))//<< Std::endl << "]" << Std::endl;
F. Modify DETECTION_OUTPUT_LAYER.HPP, note #include "boost/regex.hpp"
[HTML] View plain copy//#include <boost/regex.hpp>
6.caffe and CUDNN related file replacement
If the currently applied caffe corresponding CUDNN code is based on Cudnnv3 or CUDNNV4, to upgrade to CUDNNV5, you will need to update the corresponding Caffe, CUDNN_CONV_LAYER.HPP, CUDNN_LRN_LAYER.HPP, CUDNN_POOLING_LAYER.HPP, CUDNN_RELU_LAYER.HPP, CUDNN_SIGMOID_LAYER.HPP, Cudnn_softmax_ LAYER.HPP, CUDNN_TANH_LAYER.HPP, and their respective. cpp and. cu files are replaced.
7. cudnn.h file Replacement in Caffe
If the currently applied caffe corresponding CUDNN code is based on Cudnnv3 or CUDNNV4, to upgrade to CUDNNV5, you will need to replace the corresponding Caffe file in the latest official util/cudnn.hpp.
8. Compile Libcaffe, compile Caffe, compile classification.