필터 지우기
필터 지우기

Why is GoogLeNet classifying all inputs to the same output class?

조회 수: 2 (최근 30일)
vanrapa
vanrapa 2019년 6월 18일
편집: vanrapa 2019년 6월 19일
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,
  1. I have tried changing the initial learning rate
  2. Rearranged the training batch
  3. Used smaller training batches(about 20 images)
  4. 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개)

카테고리

Help CenterFile Exchange에서 AI for Signals and Images에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by