how can I replace the softmax layer with another classifier as svm in convolution network

I made deep learning application that using softmax
layers = [ imageInputLayer(varSize); conv1; reluLayer;
convolution2dLayer(5,32,'Padding',2,'BiasLearnRateFactor',2);
reluLayer()
maxPooling2dLayer(4,'Stride',2);
convolution2dLayer(5,32,'Padding',2,'BiasLearnRateFactor',2);
reluLayer()
maxPooling2dLayer(2,'Stride',2);
convolution2dLayer(5,64,'Padding',2,'BiasLearnRateFactor',2);
reluLayer();
maxPooling2dLayer(4,'Stride',2)
fc1;
reluLayer();
fc2;
reluLayer();
%returns a softmax layer for classification problems. The softmax layer uses the softmax activation function.
softmaxLayer()
classificationLayer()];
I want to use SVM and random forest classifiers instead of softmax. and use a deep learning for feature extraction. I hope I can get a link for a tutorial.

답변 (4개)

Here is an example: https://www.mathworks.com/help/nnet/examples/feature-extraction-using-alexnet.html

댓글 수: 1

Thanks for your answer but I don't want to use pre-trained models. I want to design mine and use it as a feature extraction.

댓글을 달려면 로그인하십시오.

Nagwa megahed
Nagwa megahed 2022년 4월 21일
the only possible solution is to save the extracted features by the deep model , then use this features as an input to the SVM or any other wanted classifier.
hello.. just wondering.. have u got the answer yet? i have the same exact problem

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2018년 4월 16일

댓글:

2022년 5월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by