MATLAB Answers

Attempt to execute SCRIPT vl_nnconv as a function

89 views (last 30 days)
Matlab_user
Matlab_user on 21 Jul 2017
Commented: Vibha Belavadi on 18 Dec 2019
I get the following error when trying to run 'vl_simplenn' from the matconvnet that is provided as an add-on package in MATLAB R2017a.
Attempt to execute SCRIPT vl_nnconv as a function:
/root/Documents/MATLAB/Add-Ons/Collections/vlfeat_matconvnet/code/vlfeat-matconvnet-6221423/matlab/vl_nnconv.m

  0 Comments

Sign in to comment.

Answers (2)

Carl
Carl on 24 Jul 2017
Edited: Carl on 24 Jul 2017
Hi, this is likely an issue with your MATLAB path. That error indicates that a script (which do not take input arguments) is being run as a function (called with input arguments). Try running the following commands:
which -all vl_simplenn
which -all vl_nnconv
And looking further into the line that is calling the vl_nnconv function. See the following Answers post for more details on this type of error:
https://www.mathworks.com/matlabcentral/answers/93148-why-do-i-receive-the-error-attempt-to-execute-script-filename-as-a-function
You may also want to contact MatConvNet about this error.

  4 Comments

Show 1 older comment
Luke Achenie
Luke Achenie on 18 Jun 2018
There is a folder called "mex". I just copied the contents of that folder into the upper level "matlab" folder and everything works now.
kyzrsze Kyzrsze
kyzrsze Kyzrsze on 25 Apr 2019
Loki sacarlet ı actually didnt understand how you fix it can you explain it please
Vibha Belavadi
Vibha Belavadi on 18 Dec 2019
I would like yo add to @Luke Achenie's answer. I added my mex path such that when I list the paths in MATLAB using path command, the '..../matlab/mex' path appears on top of '.../matlab' path

Sign in to comment.


ravi kiran
ravi kiran on 3 Aug 2017
Attempt to execute SCRIPT mapreduce as a function: /home/hadoop/matlab/R2017a/bin/job/mapreduce.mlx

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by