Borrar filtros
Borrar filtros

helperImportMatConvNet error-- Undefined function or variable

1 visualización (últimos 30 días)
Shuai Zhang
Shuai Zhang el 9 de Jun. de 2016
Comentada: Lydia el 4 de Mayo de 2018
I have an error running
convnet = helperImportMatConvNet(cnnMatFile)
in the function DeepLearningImageClassificationExample which is an example provided by Matlab in their Documentation. The error says "Undefined function or variable 'helperImportMatConvNet'. I have neural network toolbox installed, but are running on a cpu. can you help with this please?

Respuestas (4)

Diego Alcoceba Alvarez
Diego Alcoceba Alvarez el 13 de Ag. de 2017
Hi everybody!
I had the same trouble with that example, at this line:
convnet = helperImportMatConvNet(cnnFullMatFile)
So I found at the article Deep Learning for Computer Vision with MATLAB some code attached. The line which made the difference is:
cnnFullMatFile = fullfile(cnnFolder, cnnMatFile);
Thus, I think the error wasn´t about the Matlab version or similar, it actually was that cnnFullMatFile was empty...
I hope this may help all of you!
Matlab R2017a. Computer Vision System Toolbox, version 7.3
  1 comentario
Lydia
Lydia el 4 de Mayo de 2018
Thank you Diego! Your found works well! I was looking at the same webpage and had this error. Just for more clarification, the complete solution is this:
%
% Specify folder for storing CNN model
cnnFolder = 'C:\Users\Documents';
cnnMatFile = 'imagenet-caffe-alex.mat';
cnnFullMatFile = fullfile(cnnFolder, cnnMatFile);
%%Load Pre-trained CNN
% Load MatConvNet network into a SeriesNetwork
convnet = helperImportMatConvNet(cnnFullMatFile);
%%|convnet.Layers| defines the architecture of the CNN
convnet.Layers
Now the error should not appear anymore.

Iniciar sesión para comentar.


Eric Skaliks
Eric Skaliks el 19 de Jun. de 2016
See the comments: "[...] using the helper function helperImportMatConvNet in the Computer Vision System Toolbox (TM)."

Walter Roberson
Walter Roberson el 27 de Jul. de 2016
helperImportMatConvNet is part of the Computer Vision toolbox in R2016a. That demo requires R2016a or later to run.
  2 comentarios
Chan  Yao Jun
Chan Yao Jun el 27 de Jul. de 2016
would you mind to explain more about the helperImportMatConvNet? Is it a function in the Computer Vision toolbox? Cos i couldn't find information related to this function on internet.
Walter Roberson
Walter Roberson el 27 de Jul. de 2016
It is an internal utility function not intended for public use, so it is not present in the main documentation.
It is part of Computer Vision Toolbox in R2016a, which is the release that introduced Convolutional Neural Networks. The demo is defined as being part of Computer Vision Toolbox, so it is not expected that you would be able to run the demo without Computer Vision Toolbox installed.
>> help helperImportMatConvNet
Imports MatConvNet network into a SeriesNetwork object from the Neural
Network Toolbox. This function is provided for educational purposes only
and does not support all models from MatConvNet.
This helper function uses internal functions, which may change in a
future release. This function requires the Neural Network Toolbox.
References
----------
Vedaldi, Andrea, and Karel Lenc. "MatConvNet-convolutional neural
networks for MATLAB." arXiv preprint arXiv:1412.4564 (2014).

Iniciar sesión para comentar.


eiman kattan
eiman kattan el 3 de Nov. de 2016
Editada: Walter Roberson el 3 de Nov. de 2016
any one found a solution for running this demo (pet detection using deep learning in mathwork document. i am also having error with running a function called helperImportMatConvNet??
any one can help
i am using for running the code giving in:
Matlab 2016b which has the computer vision toolbox.
and the error is generated becous of this function helperImportMatConvNet??
  2 comentarios
dimpy yadav
dimpy yadav el 18 de Feb. de 2017
Same problem. Do you know the solution now?
Walter Roberson
Walter Roberson el 18 de Feb. de 2017
Are you using R2016a or later, and do you have the Computer Vision Toolbox installed (and licensed)? and do you have an NVIDIA GPU with CUDA 3.0 or later? If your NVIDIA GPU is the Pascal architecture, have you installed the Pascal patch?
Please post the output of
ver('vision')
license('test','Video_and_Image_Blockset')
opengl info

Iniciar sesión para comentar.

Categorías

Más información sobre Recognition, Object Detection, and Semantic Segmentation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by