The method of referring to the great God: http://www.th7.cn/system/win/201603/155182.shtml
First step: Need to install CUDA, vs2013;cuda default path, note Cuda version and GPU to match
The second step:. Download CUDNN, build a local folder under the Matconvnet folder, and put the CUDNN in (I changed the filename called CUDNN)
Step three: Open vl_compilenn.m, Run, wait for compilation to finish
The fourth step is to copy the Cudnn64_4.dll under the bin to the Mex folder.
Fifth step: Copy the following code to MATLAB command window, change the corresponding path and folder name, run, wait for the end of compilation.
Vl_compilenn (' Enablegpu ', true, ' cudaroot ', ' C:/programfiles/nvidia GPU Computing toolkit/cuda/v8.0 ', ' cudamethod ', ' NVCC ', ' enablecudnn ', ' true ', ' cudnnroot ', ' local/cudnn ')
Sixth step: Change the options, opts.train.gpus= [1]; Use gpu,[] to indicate CPU use, do not [0]
Finally, you can run.
GPU and CPU Comparison
GPU:GTX 960M
CPU:I5 4200 HQ
"Matconvnet" Configuration GPU