GithubHelp home page GithubHelp logo

Comments (3)

brando90 avatar brando90 commented on May 27, 2024

anyway I think I fixed it, but it seems that the matconvnet library that comes with this project is broken (at least on my mac). Downloaded a new one and works with my steup file:

function setup_brando( )
% setup_brando - make sure things are set up for using the exercises
%run matconvnet/matlab/vl_setupnn
run ../../matconvnet-1.0-beta20/matlab/vl_setupnn
run vlfeat/toolbox/vl_setup.m

end

from practical-cnn.

brando90 avatar brando90 commented on May 27, 2024

not sure if this is a new problem related to this but now vl_nnrelu crashes whenever I run it. In particular when I do:

% -------------------------------------------------------------------------
% 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) ;

I get error message:

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) ;

from practical-cnn.

brando90 avatar brando90 commented on May 27, 2024

maybe the issue is in the setup? I tried running it out of the box (exercise 1) and it seems I get the following error:

Error using mex
In file included from
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/vl_nnconv.cpp:5:
In file included from
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/vl_nnconv.cu:15:
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:28:
error: non-constant-expression cannot be narrowed from type 'ptrdiff_t' (aka 'long') to 'mwSize' (aka
'unsigned long') in initializer list [-Wc++11-narrowing]
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                           ^~~~~~~~~~~
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:28:
note: insert an explicit cast to silence this issue
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                           ^~~~~~~~~~~
                           static_cast<mwSize>( )
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:41:
error: non-constant-expression cannot be narrowed from type 'ptrdiff_t' (aka 'long') to 'mwSize' (aka
'unsigned long') in initializer list [-Wc++11-narrowing]
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                                        ^~~~~~~~~~
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:41:
note: insert an explicit cast to silence this issue
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                                        ^~~~~~~~~~
                                        static_cast<mwSize>( )
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:53:
error: non-constant-expression cannot be narrowed from type 'ptrdiff_t' (aka 'long') to 'mwSize' (aka
'unsigned long') in initializer list [-Wc++11-narrowing]
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                                                    ^~~~~~~~~~
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:53:
note: insert an explicit cast to silence this issue
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                                                    ^~~~~~~~~~
                                                    static_cast<mwSize>( )
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:65:
error: non-constant-expression cannot be narrowed from type 'ptrdiff_t' (aka 'long') to 'mwSize' (aka
'unsigned long') in initializer list [-Wc++11-narrowing]
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                                                                ^~~~~~~~~
/Users/brandomiranda/Documents/MATLAB/hbf_research/om_simulations/MatConvNet_experiments/MatConvNet_workspace/practical-cnn-2015a/matconvnet/matlab/src/bits/nnhelper.h:161:65:
note: insert an explicit cast to silence this issue
  mwSize dimensions [4] = {geom.height, geom.width, geom.depth, geom.size} ;
                                                                ^~~~~~~~~
                                                                static_cast<mwSize>( )
4 errors generated.


Error in vl_compilenn>mex_link (line 323)
  mex(mopts{:}) ;

Error in vl_compilenn (line 274)
  mex_link(opts, mex_src, obj_files, mex_libs, mex_dir, mex_opts);

Error in setup (line 15)
  vl_compilenn('enableGpu', opts.useGpu, 'verbose', opts.verbose) ;

Error in exercise1 (line 3)
setup ;

from practical-cnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.