【问题标题】:Why is MatConvNet library not working when I run vl_nnrelu?为什么当我运行 vl_nnrelu 时 MatConvNet 库不工作?
【发布时间】:2016-10-04 00:52:51
【问题描述】:

我在做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 库,因为它似乎对我不起作用(而是从他们的网站上获得了最新的......)。有没有其他人遇到过类似的错误?

【问题讨论】:

    标签: matlab machine-learning computer-vision conv-neural-network


    【解决方案1】:

    我今天遇到了完全相同的问题,并开始查看导致错误的 vl_argparse.m 文件。

    我实际上不知道 vl_nnrelu 函数与此有什么关系,所以我在“vl_nnrelu.m”中注释了以下内容:

    % opts = vl_argparse(opts, varargin, 'nonrecursive') ;
    

    然后我再次尝试运行executive1文件,它成功了。

    【讨论】:

      【解决方案2】:

      这个问题是由于使用 VLFeat 中的 vl_argparse 而不是 MatConvNet 引起的。要解决此问题,请先加载 vl_setup(VLFeat 设置),然后再加载 vl_setupnn(MatConvNet 设置)。

      【讨论】:

        猜你喜欢
        • 2011-04-20
        • 1970-01-01
        • 2017-10-14
        • 1970-01-01
        • 1970-01-01
        • 2021-08-31
        • 2018-03-15
        • 2020-01-20
        • 1970-01-01
        相关资源
        最近更新 更多