close all;clear all;clc;mynet = open('Gnet.mat');% mynet = disp(mynet);
%test classifier using train samples
imdsTest=imageDatastore('E:\Postmanpack\Ppimplementation\Myxraytesting/',... 'IncludeSubfolders', true,... 'LabelSource', 'foldernames'); inputSize= [227 227 3]; augimdsTest=augmentedImageDatastore(inputSize, imdsTest, 'ColorPreprocessing', 'gray2rgb');% %test classifier using test samples
[YPred, scores]=classify(mynet.Gnet, augimdsTest);YTest=imdsTest.Labels; %expected result
accuracy=mean(YPred==YTest)
error
Reference to non-existent field 'Gnet'.
Error in TESTALEXNET1 (line 14)
[YPred, scores]=classify(mynet.Gnet, augimdsTest);
Best Answer