digitDatasetPath = fullfile('C:\Users\2111105\Desktop\gazou1-7');
imds = imageDatastore(digitDatasetPath,...
'IncludeSubfolders',true,'LabelSource','foldernames');
imshow(imds.Files{perm(i)});
labelCount=countEachLabel(imds);
[imdsTrain, imdsValidation] = splitEachLabel(imds, numTrainFiles, ...
imageInputLayer([150 900 3])
convolution2dLayer(3,8, 'Padding','same')
maxPooling2dLayer(2,'Stride',2)
convolution2dLayer(3,8, 'Padding', 'same')
maxPooling2dLayer(2,'Stride',2)
convolution2dLayer(3,32,'padding', 'same')
options = trainingOptions ('sgdm','InitialLearnRate',0.01,...
'MaxEpochs',20,'Shuffle','every-epoch','ValidationData',imdsValidation, ...
'ValidationFrequency',1,'Verbose',false,'Plots','training-progress');
net = trainNetwork(imdsTrain,layers,options);
YPred = classify(net,imdsValidation);
YValidation = imdsValidation.Labels;
accuracy = sum(YPred == YValidation)/numel(YValidation);