CUDA7.5,cuDNN7.0,MATLAB2015a已经配置完毕。
官网下载MatConv:http://www.vlfeat.org/matconvnet/
解压到自定义目录,启动MATLAB
>>cd ~/deb/matconvnet-1.0-beta20/ >> run matlab/vl_setupnn >> vl_compilenn(‘verbose‘,1) %Compiling with CPU >> vl_compilenn(‘enableGpu‘, true, ... ‘cudaRoot‘, ‘/usr/local/cuda/‘, ... ‘cudaMethod‘, ‘nvcc‘, ... ‘enableCudnn‘, ‘true‘, ... ‘cudnnRoot‘, ‘/usr/local/cuda/lib64‘)
中间出现过如下问题:
Operands to the || and && operators must be convertible to logical scalar values. Error in vl_compilenn (line 394) if opts.enableGpu && opts.enableCudnn
原因:
The thing about &&
is that it can operate only on scalars, whereas &
can operate on arrays as well. Should change the &&
to &
to make it work .
时间: 2024-10-13 07:45:14