3x3,5x5,7x7,9x9卷积核性能比较
在用7*7的卷積核分類9*9的圖片到底應(yīng)該用幾個(gè)卷積核?中得到了一個(gè)經(jīng)驗(yàn)結(jié)論:卷積核越大,網(wǎng)絡(luò)的性能上升區(qū)間越大;上升區(qū)間越大,性能峰值越大。要按此分類9*9的圖片,9*9的卷積核就是極限性能最優(yōu)的卷積核。這次就驗(yàn)證這個(gè)觀點(diǎn)。
?
(mnist 0,2)-con(9*9)*n-30*2-(1,0)(0,1)
用9*9的卷積核分類mnist0,2,卷積核數(shù)量從2到33個(gè),收斂標(biāo)準(zhǔn)6e-5。統(tǒng)計(jì)平均值,比較卷積核數(shù)量對(duì)分類性能的影響。
?
得到表格
| ? | f2[0] | f2[1] | 迭代次數(shù)n | 平均準(zhǔn)確率p-ave | δ | 耗時(shí)ms/次 | 耗時(shí)ms/199次 | 耗時(shí) min/199 | 最大值p-max | 平均值標(biāo)準(zhǔn)差 |
| 2 | 0.8592554 | 0.1407446 | 3583946.2 | 0.9776667 | 6.00E-05 | 2062400.8 | 410417767 | 6840.2961 | 0.9900596 | 0.0076349 |
| 3 | 0.6934459 | 0.3065541 | 38925.899 | 0.9799669 | 6.00E-05 | 30715.769 | 6112448 | 101.87413 | 0.9910537 | 0.0083689 |
| 4 | 0.4673405 | 0.5326595 | 30166.276 | 0.9824595 | 6.00E-05 | 31589.251 | 6286261 | 104.77102 | 0.9910537 | 0.0076396 |
| 5 | 0.4170945 | 0.5829055 | 25983.362 | 0.9837433 | 6.00E-05 | 33737.673 | 6713801 | 111.89668 | 0.9915507 | 0.0059125 |
| 6 | 0.2864561 | 0.7135438 | 23770.226 | 0.9840255 | 6.00E-05 | 37091.392 | 7381199 | 123.01998 | 0.9915507 | 0.0055148 |
| 7 | 0.2613328 | 0.7386673 | 22559.327 | 0.9833237 | 6.00E-05 | 42215.553 | 8400902 | 140.01503 | 0.9910537 | 0.0057736 |
| 8 | 0.2261607 | 0.7738393 | 21344.186 | 0.9832063 | 6.00E-05 | 44424.935 | 8840569 | 147.34282 | 0.9910537 | 0.0057323 |
| 9 | 0.2110868 | 0.7889131 | 20384.533 | 0.9830989 | 6.00E-05 | 47688.075 | 9489940 | 158.16567 | 0.9910537 | 0.0064783 |
| 10 | 0.2060627 | 0.7939372 | 19761.482 | 0.9828541 | 6.00E-05 | 51445.075 | 10237576 | 170.62627 | 0.9900596 | 0.0057135 |
| 11 | 0.1457677 | 0.8542324 | 19322.889 | 0.9820224 | 6.00E-05 | 55209.754 | 10986747 | 183.11245 | 0.9910537 | 0.0064363 |
| 12 | 0.2161118 | 0.7838883 | 19832.055 | 0.98194 | 6.00E-05 | 64321.513 | 12799991 | 213.33318 | 0.9905567 | 0.0063398 |
| 13 | 0.1156199 | 0.8843801 | 18791.593 | 0.9822997 | 6.00E-05 | 63586.332 | 7926090 | 132.1015 | 0.9905567 | 0.0063122 |
| 14 | 0.1658659 | 0.8341341 | 18955.724 | 0.9827193 | 6.00E-05 | 70956.271 | 14120303 | 235.33838 | 0.9900596 | 0.0060133 |
| 15 | 0.185964 | 0.8140359 | 18780.759 | 0.9821348 | 6.00E-05 | 73026.568 | 14532291 | 242.20485 | 0.9905567 | 0.0061449 |
| 16 | 0.1357185 | 0.8642816 | 18840.497 | 0.9814855 | 6.00E-05 | 81444.03 | 16207362 | 270.1227 | 0.9900596 | 0.0084691 |
| 17 | 0.1558167 | 0.8441832 | 18937.834 | 0.9827243 | 6.00E-05 | 106632.71 | 21219920 | 353.66533 | 0.9905567 | 0.0059273 |
| 18 | 0.1960134 | 0.8039867 | 18645.412 | 0.9810459 | 6.00E-05 | 88521.121 | 17615710 | 293.59517 | 0.9905567 | 0.0080427 |
| 19 | 0.1809402 | 0.8190597 | 18927.709 | 0.9818251 | 6.00E-05 | 122419.96 | 24361584 | 406.0264 | 0.9900596 | 0.0061403 |
| 20 | 0.1457675 | 0.8542325 | 18760.226 | 0.9820524 | 6.00E-05 | 122352.5 | 24348153 | 405.80255 | 0.9905567 | 0.0067007 |
| 21 | 0.2060623 | 0.7939377 | 18865.905 | 0.9812956 | 6.00E-05 | 103280.36 | 20552815 | 342.54692 | 0.9905567 | 0.0060445 |
| 22 | 0.1759154 | 0.8240846 | 19115.874 | 0.9818726 | 6.00E-05 | 131887.82 | 26245685 | 437.42808 | 0.9910537 | 0.0077266 |
| 23 | 0.1658656 | 0.8341343 | 18498.497 | 0.9810833 | 6.00E-05 | 120268.38 | 23933414 | 398.89023 | 0.9895626 | 0.0065564 |
| 24 | 0.160841 | 0.8391591 | 18965.899 | 0.9817452 | 6.00E-05 | 139977.06 | 27855444 | 464.2574 | 0.9900596 | 0.0073353 |
| 25 | 0.1156199 | 0.8843801 | 18914.126 | 0.9811932 | 6.00E-05 | 136068.09 | 27077554 | 451.29257 | 0.9905567 | 0.0080618 |
| 26 | 0.1759148 | 0.8240852 | 18712.136 | 0.9807736 | 6.00E-05 | 130852.5 | 26039658 | 433.9943 | 0.9905567 | 0.0084431 |
| 27 | 0.1306936 | 0.8693063 | 18862.322 | 0.9817727 | 6.00E-05 | 152705.07 | 30388311 | 506.47185 | 0.9900596 | 0.0074685 |
| 28 | 0.1608408 | 0.8391593 | 19022.915 | 0.9820224 | 6.00E-05 | 154029.97 | 30651970 | 510.86617 | 0.9905567 | 0.0074131 |
| 29 | 0.1507922 | 0.8492078 | 19243.367 | 0.9808211 | 6.00E-05 | 166377.2 | 33109072 | 551.81787 | 0.9895626 | 0.0101928 |
| 30 | 0.1708907 | 0.8291093 | 19727.829 | 0.9817003 | 6.00E-05 | 165774.29 | 32989084 | 549.81807 | 0.9900596 | 0.0069316 |
| 31 | 0.1407426 | 0.8592574 | 19221.327 | 0.9816378 | 6.00E-05 | 175660.87 | 34956519 | 582.60865 | 0.9900596 | 0.0082442 |
| 32 | 0.1759154 | 0.8240847 | 19524.286 | 0.9810983 | 6.00E-05 | 206296.99 | 41053101 | 684.21835 | 0.9900596 | 0.0075721 |
| 33 | 0.1256688 | 0.8743311 | 19937.794 | 0.9821898 | 6.00E-05 | 178003 | 35422597 | 590.37662 | 0.9900596 | 0.0072098 |
?
將pave畫成圖
?
很明顯當(dāng)卷積核數(shù)量為6的時(shí)候網(wǎng)絡(luò)性能達(dá)到峰值。這個(gè)結(jié)論與前面的經(jīng)驗(yàn)關(guān)系完全不符,這個(gè)最優(yōu)值大于3*3卷積核的4個(gè),小于5*5卷積核的16個(gè)。
| 2分類 | 3*3 | 5*5 | 7*7 | 9*9 |
| 性能上升區(qū)間 | 4 | 16 | 55 | 6 |
| p-ave | 0.9838731 | 0.987322 | 0.987867 | 0.984025 |
| 耗時(shí)min/199次 | 11.6074 | 102.3604 | 821.3148 | 123.02 |
?
對(duì)二分類9*9尺寸的mnist0,2,平均性能峰值最大的卷積核是7*7.
?
?
| ? | 平均準(zhǔn)確率p-ave | ? | ? | |
| ? | 6.00E-05 | 6.00E-05 | 6.00E-05 | 6.00E-05 |
| ? | 3*3 | 5*5 | 7*7 | 9*9 |
| 0 | 0.981171 | 0.981171 | 0.981171 | ? |
| 1 | 0.975916 | 0.978588 | 0.976048 | ? |
| 2 | 0.981326 | 0.983376 | 0.981191 | 0.977667 |
| 3 | 0.983633 | 0.985159 | 0.983136 | 0.979967 |
| 4 | 0.983651 | 0.986268 | 0.98426 | 0.98246 |
| 5 | 0.983289 | 0.986143 | 0.984795 | 0.983743 |
| 6 | 0.983506 | 0.986323 | 0.986064 | 0.984025 |
| 7 | 0.982744 | 0.986605 | 0.986086 | 0.983324 |
| 8 | 0.982694 | 0.98689 | 0.986218 | 0.983206 |
| 9 | 0.981885 | 0.98697 | 0.986083 | 0.983099 |
| 10 | 0.980983 | 0.986988 | 0.985991 | 0.982854 |
| 11 | 0.981401 | 0.987225 | 0.986111 | 0.982022 |
| 12 | 0.98214 | 0.986988 | 0.986328 | 0.98194 |
| 13 | ? | 0.987295 | 0.986571 | 0.9823 |
| 14 | ? | 0.987132 | 0.986858 | 0.982719 |
| 15 | ? | 0.987065 | 0.98695 | 0.982135 |
| 16 | ? | 0.987322 | 0.986715 | 0.981485 |
| 17 | ? | 0.987227 | 0.987055 | 0.982724 |
| 18 | ? | 0.98672 | 0.986471 | 0.981046 |
| 19 | ? | 0.987137 | 0.986778 | 0.981825 |
| 20 | ? | 0.986988 | 0.986765 | 0.982052 |
| 21 | ? | 0.986855 | 0.986953 | 0.981296 |
| 22 | ? | ? | 0.986728 | 0.981873 |
| 23 | ? | ? | 0.98719 | 0.981083 |
| 24 | ? | ? | 0.987053 | 0.981745 |
| 25 | ? | ? | 0.98706 | 0.981193 |
| 26 | ? | ? | 0.98685 | 0.980774 |
| 27 | ? | ? | 0.98665 | 0.981773 |
| 28 | ? | ? | 0.987227 | 0.982022 |
| 29 | ? | ? | 0.986795 | 0.980821 |
| 30 | ? | ? | 0.986586 | 0.9817 |
| 31 | ? | ? | 0.98675 | 0.981638 |
| 32 | ? | ? | 0.98691 | 0.981098 |
| 33 | ? | ? | 0.986768 | 0.98219 |
在21個(gè)卷積核以內(nèi)對(duì)比4個(gè)尺寸卷積核的性能
9*9卷積核的性能顯著的小于5*5和7*7卷積核,與3*3卷積核的性能相當(dāng)。當(dāng)卷積核數(shù)量大于4個(gè)以后9*9卷積核的性能略好于3*3卷積核。在21個(gè)卷積核以內(nèi)比較這個(gè)4個(gè)尺寸的卷積核,可以得到
5*5>7*7>9*9>3*3
也就是5*5卷積核在21個(gè)以內(nèi)性能最好,但7*7卷積核由于有55個(gè)的性能上升區(qū)間最終將以8倍耗時(shí)取得萬分之5的性能優(yōu)勢(shì)。這4個(gè)卷積核極限性能最好的是7*7,但效費(fèi)比最高的應(yīng)該是5*5.
由這4個(gè)實(shí)驗(yàn)也可以得出一個(gè)經(jīng)驗(yàn)規(guī)律,對(duì)2n+1*2n+1或者2n*2n尺寸的圖片,卷積核最優(yōu)尺寸為2n-1*2n-1,在小于等于2n-1的范圍內(nèi),卷積核越大,網(wǎng)絡(luò)的性能上升區(qū)間越大:上升區(qū)間越大,性能峰值越大。
?
關(guān)于卷積核的實(shí)驗(yàn)整理
用7*7的卷積核分類9*9的圖片到底應(yīng)該用幾個(gè)卷積核?55個(gè)
(mnist 0,2)-con(7*7)*n-30*2-(1,0)(0,1)
?
到底應(yīng)該用3*3的卷積核還是5*5的卷積核
(mnist 0,2)-con(5*5)*n-30*2-(1,0)(0,1)
?
二分類卷積核極限數(shù)量實(shí)驗(yàn)
(mnist 0,2)-con(3*3)*n-30*2-(1,0)(0,1)
?
/**/
實(shí)驗(yàn):3*3卷積核10分類9*9圖片卷積核數(shù)量最優(yōu)值?
?
估算神經(jīng)網(wǎng)絡(luò)卷積核數(shù)量的近似方法
3*3卷積核5分類
《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀總結(jié)
以上是生活随笔為你收集整理的3x3,5x5,7x7,9x9卷积核性能比较的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 神经网络的分类行为怎么就不能是一种力的行
- 下一篇: 多重态与连续性