フィルターのクリア

How to monitor Deep learning training

2 ビュー (過去 30 日間)
Mustafa Yildiz
Mustafa Yildiz 2020 年 4 月 13 日
コメント済み: Mohammad Sami 2020 年 4 月 13 日
Hello i wanna monitor the training when its happening , how should i change the code for that ?
outputFolder = fullfile('faceset');
rootFolder = fullfile(outputFolder,'faces');
categories = {'Ali','amanda','Betul','Clarisse','Elizabet','Erica','Firdevs','Furkan','Gabia','Gabriela','Irem','Justa','Kadir','Laura','Mehmet','Merve','Mustafa','Oguz','Ruta','Vika','Yigit'}; %choosing the categories which is gonna go to training
imds = imageDatastore(fullfile(rootFolder,categories),'LabelSource','foldernames');
tbl = countEachLabel(imds);
minSetCount = min(tbl{:,2});
imds = splitEachLabel(imds, minSetCount,'randomize');
countEachLabel(imds);
Ali = find(imds.Labels == 'Ali',1);
amanda = find(imds.Labels == 'amanda',1);
net = resnet101();
net.Layers(1);
net.Layers(end);
[trainingSet,testSet] = splitEachLabel(imds,0.3,'randomize');
imageSize = net.Layers(1).InputSize;
augmentedTrainingSet = augmentedImageDatastore(imageSize,...
trainingSet,'ColorPreprocessing','gray2rgb');
augmentedTestSet = augmentedImageDatastore(imageSize,...
testSet,'ColorPreprocessing','gray2rgb');
w1 = net.Layers(2).Weights;
w1 = mat2gray(w1);
featureLayer = 'fc1000';
trainingFeatures = activations(net,augmentedTrainingSet,...
featureLayer,'MiniBatchSize',32,'OutputAs','columns');
trainingLables = trainingSet.Labels;
classifier=fitcecoc(trainingFeatures,...
trainingLables,'Learner','Linear','Coding','onevsall','ObservationsIn','columns');
testFeature = activations(net,augmentedTestSet,...
featureLayer,'MiniBatchSize',32,'OutputAs','columns');
predictLabels = predict(classifier, testFeature,'ObservationsIn','columns');
testLables = testSet.Labels;
confMat = confusionmat(testLables , predictLabels);
confMat = bsxfun(@rdivide , confMat , sum(confMat,2));
mean(diag(confMat));
  3 件のコメント
Mohammad Sami
Mohammad Sami 2020 年 4 月 13 日
Matlab also provides a free online course on deep learning. You can check it out here

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by