How to use a trained network to test new data set?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Morteza Heidarinejad
am 25 Jul. 2017
Kommentiert: hanaa
am 28 Mär. 2021
Hi I have trained Alexnet network with my image data and saved it as a 'my_trained_net.mat'. Now In another script, I want to load it and just check it by new data set which has not been used for training. my code is as below:
net=load ('my_trained_net.mat');
[FileName,PathName]=uigetfile({'*.jpg';'*.tiff'},'Select Your picture');
newImage = strcat(PathName, FileName);
img = readAndPreprocessImage(newImage);
label = char(classify(net,img));
figure,imshow(img);
title(label);
this is exactly what I have used at the end of my training script to label some test images. the error is ' classify Requires at least three arguments' which means it does not recognize the 'net' as a SeriesNetwork object.
any comment or better way to do the same act is welcome thanks
1 Kommentar
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!