Matlab tool for CNN-SVM implementation
조회 수: 3 (최근 30일)
이전 댓글 표시
Dear
I am using Matlab in a deep learning project. It has extensive support for implementing CNN and LSTM. My query is does Matlab support combination of CNN and a linear classifier in a model?
I want to mean that, using a trainNetwork function either supports lstm implementtion or CNN implementation based on the defintioin we created in layers and options field. But if I want to apply a linear classifier after the fully conneted layer, will Matlab support such type of modification through its deep learning toolbox?
Any kind of advice in this regard on how to infuse svm with cnn will be highly regarded.
thanks,
댓글 수: 2
H W
2022년 11월 3일
편집: KSSV
2022년 11월 3일
you can divide the system into two process
the first is cnn to obtain the features
the second is SVN to linear classifier
the connect features is
% Extract features from 'fc' layer form cnn.
layer = 'fc';
featuresTrain = activations(net,Traindata,layer,'OutputAs','rows');
% Train SVM classififer with those features.
YTrain = Train.Labels;
classifier = fitcecoc(featuresTrain,YTrain);
best wishes!
Hiro Yoshino
2022년 11월 3일
편집: Hiro Yoshino
2022년 11월 3일
There is a good example that shows the whole workflow using a CNN based feature extractor combined with a SVM based classifier.
https://www.mathworks.com/help/deeplearning/ref/seriesnetwork.activations.html (see the section: Feature Extraction Using SqueezeNet)
답변 (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!