Borrar filtros
Borrar filtros

can anyone tell the code for save and test the neural network??

2 visualizaciones (últimos 30 días)
Deepika B
Deepika B el 13 de Mzo. de 2020
Respondida: Harsha Priya Daggubati el 16 de Mzo. de 2020
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

Respuestas (1)

Harsha Priya Daggubati
Harsha Priya Daggubati el 16 de Mzo. de 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!

Categorías

Más información sobre Image Data Workflows 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