extract features and pass to svm for classification
Ältere Kommentare anzeigen
i want to extract features of my dataset and pass it to svm for classification. when i use pretrain alexnet and do feature extraction then code work well and give me result. but i want to replace pretrained alexnet with mnist dataset (mnist model that i have save already by transfer learning of mnist data from scratch). when i load mnist data and then do feature extraction process then code gives me error ( activations(net,trainingImages,layer); activations(net,testImages,layer); give error in these lines that is in activations). here i attach the code please guide me how to remove the error and what is issue
4 Kommentare
Giridharan Kumaravelu
am 18 Jul. 2018
Could you please post the exact error you get or attach the pretrainedmnist.mat file, so we could know what error you get?
Alpha Bravo
am 19 Jul. 2018
To my knowledge, the MNIST data set contains images of the 28 x 28 resolution, while AlexNet was trained on 224 x 224 images. You won't be able to do transfer learning effectively without re-scaling the images.
amina naseer
am 21 Jul. 2018
Thet Hnin Zaw
am 25 Feb. 2020
hey..i want to also use Alexnet + SVM .So, can i get your coding.
Antworten (1)
amina naseer
am 18 Jul. 2018
Bearbeitet: amina naseer
am 18 Jul. 2018
0 Stimmen
3 Kommentare
Giridharan Kumaravelu
am 18 Jul. 2018
Bearbeitet: Giridharan Kumaravelu
am 18 Jul. 2018
It looks like the loaded pretrained model may not be in the correct format for the written code. Could you please attach the mat files containing the alexnet and pretrainedmnistnet ?
amina naseer
am 19 Jul. 2018
Giridharan Kumaravelu
am 24 Jul. 2018
Bearbeitet: Giridharan Kumaravelu
am 24 Jul. 2018
I am not in a position to receive any files. But you could look into this example https://mathworks.com/help/nnet/examples/transfer-learning-using-alexnet.html where it is explained what you are trying to do. As Alpha Bravo mentioned, this could be a dimension mismatch problem. Please check the third dimension of your image too.
Kategorien
Mehr zu Detect and Segment Objects finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!