Why is GoogLeNet classifying all inputs to the same output class?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I seem to be having a problem classifying with GoogLeNet. I am using vibration data (420-by-10002 matrix) sampled at 10 KHz. CWT of the vibration data were taken and the scalograms were obtained. These scalograms were used to train the GoogLeNet to classify among the six output categories: 'TEN', 'TWENTY', 'THIRTY', ‘FORTY’, ‘FIFTY’ and 'SIXTY'.
But I am getting the output ‘TWENTY’ irrespective of the inputs.
I am using cwtfilterbank to plot scalograms. For GoogLeNet, I have only used default conditions,
80% for validation and 20% for testing
MiniBatchSize = 15
MaxEpochs = 50 to 200
InitialLearnRate = 1e-4
ValidationFrequency = 10
I have found the optimal number of MaxEpochs as the one with the highest validation accuracy.
I have attached snippets of my code and my network layer graph.
% Scalogram
Fs = 10000;
filb = cwtfilterbank('SignalLength',10000,...
'SamplingFrequency',Fs,...
'VoicesPerOctave',12);
sg = vibhistory.data(1,1:10000);
[cfs,freq] = wt(filb,sg);
t = (0:9999)/Fs;
figure;
pcolor(t,freq,abs(cfs));
% GoogLeNet
rng default
[imgTr,imgVal] = splitEachLabel(allImg,0.8,'randomized');
net = googlenet;
lgraph = layerGraph(net);
options = trainingOptions('sgdm',...
'MiniBatchSize',15,...
'MaxEpochs',120,...
'InitialLearnRate',1e-4,...
'ValidationData',imgVal,...
'ValidationFrequency',10,...
'Verbose',1,...
'ExecutionEnvironment','cpu',...
'Plots','training-progress');
rng default
mygn = trainNetwork(imgTr,lgraph,options);
I am using the example code given in Mathworks website for ECG Classification problem (CWTGoogLeNet). Although it works fine for their data, it does not work for mine.
I have searched for similar problem in Internet extensively and have implemented the answers too,
- I have tried changing the initial learning rate
- Rearranged the training batch
- Used smaller training batches(about 20 images)
- Normalized the input images
But I am getting the same similar output only.
What am I doing wrong here? Am I supposed to arrange the training set and output labels in a particular manner or do I need to replace some layers in the network? What else might be the issue here?
Any help would be great. Thanks.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Time-Frequency Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!