unable to display training progress using SVM classifier
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Prateek Rai
am 13 Sep. 2021
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.
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!