DenseNet-201 DAGNetwork compilation problem
5 views (last 30 days)
Show older comments
Hi,I'm new to MATLAB. I'm using MATLAB to perform transfer learning.
After using transfer learning based on densenet201, I get the DAGNetwork I need and I want to compile a recongnition program (.exe) using MATLAB.
Here is my recongnition program code (combinetest.m):
%MAIN PROGRAM
load('demo1');
while(1)
if(exist('00015.jpg','file') ~=0)
try
I=imread('00015.jpg');
catch
delete('00015.jpg');
continue;
end
m=fishrecon(I,net);
delete('00015.jpg');
fileID = fopen('result.txt','w');
fprintf(fileID,'%s',m);
fclose(fileID);
end
pause(0.5);
end
And fishrecon function (fishrecon.m):
functionm=fishrecon(imd,net)
if(ischar(imd))
imd=eval(imd);
end
imd=imresize(imd,[224,224]);
[label,scores] = classify(net, imd);
classNames = net.Layers(end).ClassNames;
m=string(label)+ num2str(100*scores(classNames == label),3) +"%";
'demo1' is the DAGNetwork I got from transfer learning on densenet201.
I compile the MATLAB code with the build-in APP --Application Compiler,but after compilation the program keeps jumping out the error message.
It seems the code below went wrong.
m=fishrecon(I,net);
But the code works fine while using MATLAB editor.
Have anybody encountered this problem? Please help.
0 Comments
Answers (1)
Kyle Peterson
on 21 Oct 2019
我得到同样的错误当试图俄文n my compiled code that uses DenseNet-201 to classify images. I found a link on the Matlab documentation that may explain?
//www.tatmou.com/help/coder/ug/networks-and-layers-supported-for-c-code-generation.html
Does this mean that DenseNet-201 cannot be used in the matlab compiler?
0 Comments
See Also
下载188bet金宝搏
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!