HOW TO INCREASE TESTING ACCURACY IN CNN?

조회 수: 74(최근 30일)
Saira
Saira 2020년 6월 29일
답변: o.cefet cefet 2020년 9월 1일
I have 5600 training images. I have extracted features using Principal Component Analysis (PCA). Now I am applying CNN on feature vector. Testing accuracy is 18%. How to increase testing accuracy?
Feature vector size: 640*1
Training code:
layers = [
imageInputLayer([1 640 1]);
reluLayer
fullyConnectedLayer(7);
softmaxLayer();
classificationLayer()];
options = trainingOptions('sgdm', 'Momentum',0.95, 'InitialLearnRate',0.0001, 'L2Regularization', 1e-4, 'MaxEpochs',20);

답변(3개)

vaibhav mishra
vaibhav mishra 2020년 6월 30일
Hi,
there can be different ways to increase the test accuracy.
If your training accuracy is good but test accuracy is low then you need to introduce regularization in your loss function, or you need to increase your training set.
if your training accuracy increased and then decreased and then your test accuracy is low, you are over training your model so try to reduce the epochs.
if your both training and testing accuracy are less then try to either change your model architecture, or increase the training data or decrease learning rate or increase the number of epochs.
Feel free to ask for any clarification.
  댓글 수: 1
Saira
Saira 2020년 7월 2일
Thanks Vaibhav

댓글을 달려면 로그인하십시오.


Saira
Saira 2020년 7월 9일
Hi,
I changed the training parameters but the testing accuracy is still not increasing. What should I do to increase accuracy?
Code:
options = trainingOptions('adam', 'InitialLearnRate',3e-4, 'SquaredGradientDecayFactor',0.99, 'L2Regularization',0.521, ... 'MaxEpochs',500, 'MiniBatchSize',64, 'Shuffle','every-epoch', 'Plots','training-progress');

o.cefet cefet
o.cefet cefet 2020년 9월 1일
Hello, my dear.
I think you could insert two things: layer dropout and data augmentation.
It's fine with your regularization code, but now you have to change the value of these regularizations, and look for "the best value".

Community Treasure Hunt

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

Start Hunting!

Translated by