The training and validation accuracy stuck in the value of 74% in Resnet 50
I’m new to the world of Deep Learning and I’m attempting to classify sequences of proteins into two classes using scalogram images [class1=192, class2=171] I’ve implemented Transfer Learning with ResNet 50 as my model architecture.the accuracy in The training and validation stuck in 73-78 %.Anyone can explain to me what happen because I confused
The sample data : [class1]:
The sample data : [class2]:
as you see the pictures in both groups look very similar
The code:
[imdsTrain,imdsVal]= splitEachLabel(imds,0.7,"Randomized");
aug= imageDataAugmenter("RandYReflection",true,"RandXReflection",true)
augTrain = augmentedImageDatastore([224,224],imdsTrain,"DataAugmentation",aug);
augVal = augmentedImageDatastore([224,224],imdsVal);
options =trainingOptions("sgdm",…
"InitialLearnRate",3e-4,…
"MaxEpochs",100,…
"Plots","training-progress",…
"Shuffle","every-epoch",…
"ValidationData",augVal,…
"ValidationFrequency",1,…
"MiniBatchSize",128,…
"L2Regularization",1e-4)
net = resnet50;
lgraph = layerGraph(net);
fclayer = lgraph.Layers(end-2);
newFclayer = fullyConnectedLayer(2,"Name","NewFc",’BiasL2Factor’,10,"WeightL2Factor",10);
lgraph = replaceLayer(lgraph,fclayer.Name,newFclayer);
classlayer = lgraph.Layers(end);
newClassLayer = classificationLayer("Name","newClassLayer");
lgraph= replaceLayer(lgraph,classlayer.Name,newClassLayer);
net = trainNetwork(augTrain,lgraph,options);
The Training process:I’m new to the world of Deep Learning and I’m attempting to classify sequences of proteins into two classes using scalogram images [class1=192, class2=171] I’ve implemented Transfer Learning with ResNet 50 as my model architecture.the accuracy in The training and validation stuck in 73-78 %.Anyone can explain to me what happen because I confused
The sample data : [class1]:
The sample data : [class2]:
as you see the pictures in both groups look very similar
The code:
[imdsTrain,imdsVal]= splitEachLabel(imds,0.7,"Randomized");
aug= imageDataAugmenter("RandYReflection",true,"RandXReflection",true)
augTrain = augmentedImageDatastore([224,224],imdsTrain,"DataAugmentation",aug);
augVal = augmentedImageDatastore([224,224],imdsVal);
options =trainingOptions("sgdm",…
"InitialLearnRate",3e-4,…
"MaxEpochs",100,…
"Plots","training-progress",…
"Shuffle","every-epoch",…
"ValidationData",augVal,…
"ValidationFrequency",1,…
"MiniBatchSize",128,…
"L2Regularization",1e-4)
net = resnet50;
lgraph = layerGraph(net);
fclayer = lgraph.Layers(end-2);
newFclayer = fullyConnectedLayer(2,"Name","NewFc",’BiasL2Factor’,10,"WeightL2Factor",10);
lgraph = replaceLayer(lgraph,fclayer.Name,newFclayer);
classlayer = lgraph.Layers(end);
newClassLayer = classificationLayer("Name","newClassLayer");
lgraph= replaceLayer(lgraph,classlayer.Name,newClassLayer);
net = trainNetwork(augTrain,lgraph,options);
The Training process: I’m new to the world of Deep Learning and I’m attempting to classify sequences of proteins into two classes using scalogram images [class1=192, class2=171] I’ve implemented Transfer Learning with ResNet 50 as my model architecture.the accuracy in The training and validation stuck in 73-78 %.Anyone can explain to me what happen because I confused
The sample data : [class1]:
The sample data : [class2]:
as you see the pictures in both groups look very similar
The code:
[imdsTrain,imdsVal]= splitEachLabel(imds,0.7,"Randomized");
aug= imageDataAugmenter("RandYReflection",true,"RandXReflection",true)
augTrain = augmentedImageDatastore([224,224],imdsTrain,"DataAugmentation",aug);
augVal = augmentedImageDatastore([224,224],imdsVal);
options =trainingOptions("sgdm",…
"InitialLearnRate",3e-4,…
"MaxEpochs",100,…
"Plots","training-progress",…
"Shuffle","every-epoch",…
"ValidationData",augVal,…
"ValidationFrequency",1,…
"MiniBatchSize",128,…
"L2Regularization",1e-4)
net = resnet50;
lgraph = layerGraph(net);
fclayer = lgraph.Layers(end-2);
newFclayer = fullyConnectedLayer(2,"Name","NewFc",’BiasL2Factor’,10,"WeightL2Factor",10);
lgraph = replaceLayer(lgraph,fclayer.Name,newFclayer);
classlayer = lgraph.Layers(end);
newClassLayer = classificationLayer("Name","newClassLayer");
lgraph= replaceLayer(lgraph,classlayer.Name,newClassLayer);
net = trainNetwork(augTrain,lgraph,options);
The Training process: cnn, deep learning, computer vision MATLAB Answers — New Questions