필터 지우기
필터 지우기

helperImportMatConvNet error-- Undefined function or variable

조회 수: 1 (최근 30일)
Shuai Zhang
Shuai Zhang 2016년 6월 9일
댓글: Lydia 2018년 5월 4일
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?

답변 (4개)

Diego Alcoceba Alvarez
Diego Alcoceba Alvarez 2017년 8월 13일
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
Lydia
Lydia 2018년 5월 4일
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.

댓글을 달려면 로그인하십시오.


Eric Skaliks
Eric Skaliks 2016년 6월 19일
See the comments: "[...] using the helper function helperImportMatConvNet in the Computer Vision System Toolbox (TM)."

Walter Roberson
Walter Roberson 2016년 7월 27일
helperImportMatConvNet is part of the Computer Vision toolbox in R2016a. That demo requires R2016a or later to run.
  댓글 수: 2
Chan  Yao Jun
Chan Yao Jun 2016년 7월 27일
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 2016년 7월 27일
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).

댓글을 달려면 로그인하십시오.


eiman kattan
eiman kattan 2016년 11월 3일
편집: Walter Roberson 2016년 11월 3일
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
dimpy yadav
dimpy yadav 2017년 2월 18일
Same problem. Do you know the solution now?
Walter Roberson
Walter Roberson 2017년 2월 18일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Recognition, Object Detection, and Semantic Segmentation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by