can anyone tell the code for save and test the neural network??
2 views (last 30 days)
Show older comments
I think so ,My model is not overfitting but when the net is saved and test using classify syntax the testing fails,,, what is that means?
confusion matrix overall accuracy is 87% but testing get fails? what is the reason behind this ? Is this is related to test image or there is a problem in the save and test of a neural network ?
code for save the net and test :
load res1.mat;
imgpath='C:\Users\Administrator\m\'; % the folder in which ur images exists
am=dir([imgpath '*.jpg']);
for i = 1 : 30
a{i}=imread([imgpath am(i).name]);
label = classify(net1,a{i});
figure
imshow(a{i})
title(char(label));
end
0 Comments
Answers (1)
Harsha Priya Daggubati
on 16 Mar 2020
Hi,
I guess there is nothing wrong with your network. You should try giving your network a unique name while saving, and use your network name after loading to classify the test images instead of using 'classify' method.
Refer to the thread:
Hope this helps!
0 Comments
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!