unable to display training progress using SVM classifier
4 次查看(过去 30 天)
显示 更早的评论
Hi,
i going through a research paper (A Transfer Learning Architecture Based on a Support Vector Machine for Histopathology Image Classification) where CNN fully connected layer are connected to a SVM classifer. However when i try to simulate the model as shown in the paper, i notice that the training progress are not displayed as compared to training CNN classifier. Below is the code that i used to simulate the model.
imds = imageDatastore('MerchData', 'IncludeSubfolders',true, 'LabelSource','foldernames');
[imdsTrain,imdsValidation] = splitEachLabel(imds,0.7);
testnet = alexnet
inputSize = testnet.Layers(1).InputSize
augimdsTrain = augmentedImageDatastore(inputSize(1:2),imdsTrain)
augimdsValidation = augmentedImageDatastore(inputSize(1:2),imdsValidation)
layer = 'fc8';
featuresTrain = activations(testnet,augimdsTrain,layer,'OutputAs','rows')
featuresTest = activations(testnet,augimdsValidation,layer,'OutputAs','rows');
whos featuresTrain
YTrain = imdsTrain.Labels;
YValidation = imdsValidation.Labels;
classifier = fitcecoc(featuresTrain,YTrain);
YPred = predict(classifier,featuresTest);
accuracy = mean(YPred == YValidation)
The training progress that i trying to simulate is as shown in the picture below where it is obtain from the research paper.
Thank you very much.
0 个评论
采纳的回答
Prateek Rai
2021-9-13
To my understanding, you are trying to simulate a model where CNN fully connected layers are connected to a SVM classifer at the end and want to display the training progress.
Training progress can be dispalyed in different manner in case of SVM. You can display diagnostic messages instead during training by using the 'Verbose' name-value pair argument. It controls the amount of diagnostic information per binary learner that the software displays in the Command Window.
You can refer to verbose MathWorks documentation page to find more on 'Verbose' name-value pair in 'fitcecoc' function.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!