What are the possible ways to increase the accuracy while training through CNN network?
2 views (last 30 days)
Show older comments
I am trying to pass 4-D image arrays through the CNN layers , i.e. through this : layers = [imageInputLayer([32 32 1]) convolution2dLayer(5,20) reluLayer() maxPooling2dLayer(2,'Stride',2) fullyConnectedLayer(size(categories(trainAngle),1)) softmaxLayer classificationLayer]; and I have images,already gray scaled. and I am also passing, the corresponding angle values which has the dimension of [size(Images,4) 1], i.e. 2-D angle array! following lines of codes are : options = trainingOptions('sgdm', 'MaxEpochs', 100, ... 'InitialLearnRate', 0.001);
convnet = trainNetwork(trainZ, trainAngle, layers,options);
where trainZ is training images 4-D & trainAngle is training angle of 2-D size.
resultant_Train = classify(convnet,trainZ); %Training data
resultant_Valid = classify(convnet,validZ);
where validZ is validation or testing data.
But my accuracy chart was :- ========================================================================================= | Epoch | Iteration | Time Elapsed | Mini-batch | Mini-batch | Base Learning| | | | (seconds) | Loss | Accuracy | Rate =========================================================================================| | 1 | 1 | 0.34 | 7.0118 | 0.00% | 0.0010 2 | 50 | 16.21 | 3.4001 | 25.78% | 0.0010 | | 4 | 100 | 32.37 | 2.5385 | 39.06% | 0.0010 | | 5 | 150 | 48.33 | 2.8044 | 41.41% | 0.0010 | | 7 | 200 | 64.35 | 2.8276 | 40.63% | 0.0010 | | 9 | 250 | 80.58 | 2.7260 | 39.84% | 0.0010 | | 10 | 300 | 96.86 | 2.5052 | 49.22% | 0.0010 | | 12 | 350 | 113.49 | 3.0974 | 45.31% | 0.0010 | | 14 | 400 | 129.63 | 2.8960 | 42.19% | 0.0010 | | 15 | 450 | 145.80 | 2.2082 | 53.13% | 0.0010 | | 17 | 500 | 161.91 | 1.6596 | 67.19% | 0.0010 | | 19 | 550 | 178.04 | 2.5425 | 57.03% | 0.0010 | | 20 | 600 | 194.35 | 4.2116 | 49.22% | 0.0010 | | 22 | 650 | 210.80 | 2.2605 | 56.25% | 0.0010 | | 24 | 700 | 227.26 | 2.3513 | 60.94% | 0.0010 | | 25 | 750 | 243.27 | 2.8299 | 60.16% | 0.0010 | | 27 | 800 | 259.24 | 2.4145 | 64.06% | 0.0010 | | 29 | 850 | 275.41 | 1.6220 | 67.19% | 0.0010 | | 30 | 900 | 291.33 | 2.6989 | 61.72% | 0.0010 | | 32 | 950 | 307.32 | 2.5999 | 67.19% | 0.0010 | | 34 | 1000 | 323.28 | 3.7991 | 56.25% | 0.0010 | | 35 | 1050 | 339.20 | 2.1487 | 70.31% | 0.0010 | | 37 | 1100 | 355.05 | 2.7791 | 68.75% | 0.0010 | | 39 | 1150 | 370.92 | 4.8829 | 53.13% | 0.0010 | | 40 | 1200 | 386.86 | 2.0481 | 69.53% | 0.0010 | | 42 | 1250 | 402.82 | 2.5822 | 71.88% | 0.0010 | | 44 | 1300 | 418.93 | 2.9441 | 65.63% | 0.0010 | | 45 | 1350 | 434.86 | 2.9613 | 64.06% | 0.0010 | | 47 | 1400 | 450.90 | 2.5159 | 71.88% | 0.0010 | | 49 | 1450 | 466.87 | 1.2781 | 77.34% | 0.0010 | | 50 | 1500 | 482.75 | 2.0612 | 68.75% | 0.0010 | | 52 | 1550 | 498.81 | 1.7994 | 81.25% | 0.0010 | | 54 | 1600 | 515.03 | 2.8094 | 73.44% | 0.0010 | | 55 | 1650 | 531.58 | 2.2264 | 73.44% | 0.0010 | | 57 | 1700 | 548.05 | 2.2138 | 77.34% | 0.0010 | | 59 | 1750 | 564.88 | 1.9252 | 74.22% | 0.0010 | | 60 | 1800 | 581.93 | 1.6136 | 82.81% | 0.0010 | | 62 | 1850 | 598.06 | 2.9149 | 69.53% | 0.0010 | | 64 | 1900 | 614.52 | 1.0750 | 82.03% | 0.0010 | | 65 | 1950 | 630.70 | 2.3359 | 78.91% | 0.0010 | | 67 | 2000 | 646.65 | 1.4321 | 83.59% | 0.0010 | | 69 | 2050 | 662.65 | 2.2901 | 75.78% | 0.0010 | | 70 | 2100 | 678.92 | 2.5174 | 78.13% | 0.0010 | | 72 | 2150 | 695.66 | 2.2956 | 78.13% | 0.0010 | | 74 | 2200 | 712.21 | 2.0279 | 81.25% | 0.0010 | | 75 | 2250 | 729.02 | 3.7779 | 68.75% | 0.0010 | | 77 | 2300 | 746.28 | 1.8612 | 82.03% | 0.0010 | | 79 | 2350 | 762.83 | 4.6060 | 61.72% | 0.0010 | | 80 | 2400 | 779.21 | 1.6944 | 85.16% | 0.0010 | | 82 | 2450 | 796.09 | 3.1484 | 75.78% | 0.0010 | | 84 | 2500 | 812.81 | 3.3044 | 72.66% | 0.0010 | | 85 | 2550 | 829.76 | 2.3785 | 81.25% | 0.0010 | | 87 | 2600 | 846.00 | 4.7383 | 63.28% | 0.0010 | | 89 | 2650 | 861.98 | 3.1656 | 71.88% | 0.0010 | | 90 | 2700 | 877.81 | 2.6156 | 75.78% | 0.0010 | | 92 | 2750 | 893.65 | 2.3809 | 80.47% | 0.0010 | | 94 | 2800 | 909.45 | 3.8142 | 68.75% | 0.0010 | | 95 | 2850 | 925.28 | 2.7810 | 77.34% | 0.0010 | | 97 | 2900 | 941.25 | 3.7744 | 73.44% | 0.0010 | | 99 | 2950 | 957.26 | 2.8002 | 78.91% | 0.0010 | | 100 | 3000 | 973.10 | 4.2253 | 70.31% | 0.0010 | ========================================================================================= And my training accuracy is 66% and validation accuracy is 6% only. How can I increase my accuracy, Because it is too bad. I have split the data in 75:25 for training and testing purpose.
0 Comments
Answers (0)
See Also
Categories
Find more on Recognition, Object Detection, and Semantic Segmentation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!