How to train features that have been extracted by using GoogleNet?

Hello,
I extracted features by using GoogleNet, but I do not know how to train it to create classifier?
Thanks in advance

6 Comments

How did you extracted the features using Googlenet. Kindly help.
I use this way to extract features:
net = googlenet()
%Extract features
featureLayer = 'pool5-drop_7x7_s1';
trainingFeatures = activations(net, trainingSet, featureLayer);
I am getting error while using the above command. Can someone help me with this? @Jatin Waghela @Mathworks
Have you define the "trainingSet"?
Yes. I have defined trainingSet.
what is the error that you have got?

Sign in to comment.

Answers (2)

If I understood you correctly, you would like to transfer learning to retrain GoogLeNet to create a classifier.
Please refer to the below documentation link which gives more information on Pretrained GoogLeNet convolutional neural network:

7 Comments

Actually, I extract features by using activation, now I do not know how to train it to get a classifier.
fitecec and other methods do not work. I think I need to understand the output of activation.
Hi,I want to know how to extract features from GoogLeNet, the function 'activations' are not work, the object function of DAGNetwork only has three functions, and there not exist the function 'activations'.https://cn.mathworks.com/help/nnet/ref/dagnetwork.html?s_tid=srchtitle
Yes, the activations function is not working and how to extract the features learned by the googlenet ? In Alexnet we could use activation (Alexnet,trainimages,'fc7') in order to extract the features. Any similar function for googlenet?
I use this way to extract features:
net = googlenet()
%Extract features
featureLayer = 'pool5-drop_7x7_s1';
trainingFeatures = activations(net, trainingSet, featureLayer);
I am getting error while using the above command. Can someone help me with this? @Jatin Waghela
Has anyone tried to extract features from layers other than pool5-drop_7*7_s1? If so what is the syntax?
https://www.mathworks.com/matlabcentral/answers/379635-error-using-activations-with-googlenet-in-r2017b#answer_302390

Sign in to comment.

use some layer as the feature . then you can use it for other classifier
net = googlenet;
inputSize = net.Layers(1).InputSize;
imds = imageDatastore(dbpathSave)
augimdsTrain = augmentedImageDatastore(inputSize(1:2),imds );
%%Extract Image Features
layer = 'loss3-classifier';%1000
featuresTrain = activations(net,augimdsTrain,layer,'OutputAs','rows');

Categories

Find more on Text Analytics Toolbox in Help Center and File Exchange

Asked:

on 27 Sep 2017

Community Treasure Hunt

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

Start Hunting!