我正在做practical/exercises以学习使用MatConvNet,并尝试运行:
% -------------------------------------------------------------------------
% Part 1.2: Non-linear gating (ReLU)
% -------------------------------------------------------------------------
w = single(repmat([1 0 -1], [1, 1, 3])) ;
w = cat(4, w, -w) ;
y = vl_nnconv(x, w, []) ;
z = vl_nnrelu(y) ;
figure(6) ; clf ; colormap gray ;
subplot(1,2,1) ; vl_imarraysc(y) ;
subplot(1,2,2) ; vl_imarraysc(z) ;但是当我这样做的时候,我在z = vl_nnrelu(y) ;上得到了如下的错误消息:
Error using vl_argparse (line 52)
The name of the parameter number 1 is not a string.
Error in vl_nnrelu (line 34)
opts = vl_argparse(opts, varargin, 'nonrecursive') ;
Error in exercise1 (line 52)
z = vl_nnrelu(y) ;这对我来说似乎很奇怪。我也没有运行他们在教程中提供的matconvnet库,因为它似乎对我不起作用(从他们的网站上获得了最新的一个...)。还有谁遇到过类似的错误吗?
发布于 2016-07-31 05:32:29
出现此问题的原因是从VLFeat而不是MatConvNet使用vl_argparse。要解决此问题,请先加载vl_setup (VLFeat安装程序),然后加载vl_setupnn (MatConvNet安装程序)。
发布于 2016-06-07 21:49:17
我今天遇到了完全相同的问题,并开始查看错误所在的vl_argparse.m文件。
我实际上不知道vl_nnrelu函数与此有什么关系,所以我在‘vl_nnrelu.m’中注释掉了以下内容:
% opts = vl_argparse(opts, varargin, 'nonrecursive') ;然后我再次尝试运行exercise1文件,它起作用了。
https://stackoverflow.com/questions/37623130
复制相似问题