3层,5层,7层,9层网络性能比较-0-2
制作4個網(wǎng)絡(luò),分別是3層,5層,7層,9層在迭代終止標(biāo)準(zhǔn)相同的前提下統(tǒng)計分類準(zhǔn)確率比較增加網(wǎng)絡(luò)層數(shù)是否一定可以改善網(wǎng)絡(luò)性能?
3層網(wǎng)絡(luò)的結(jié)構(gòu)是
(mnist 0 ,mnist 2)81-30-2-(1,0) || (0,1)
分類mnist的0和2,將28*28的圖片壓縮到9*9,三層網(wǎng)絡(luò)的節(jié)點數(shù)量分別是81,30,2。讓0向(1,0)收斂,讓2向(0,1)收斂,網(wǎng)絡(luò)的迭代停止的標(biāo)準(zhǔn)是
|輸出函數(shù)-目標(biāo)函數(shù)|<δ
讓δ=0.5到1e-6的34個值,每個δ重復(fù)收斂199次,統(tǒng)計迭代次數(shù)平均值,分類準(zhǔn)確率平均值,分類準(zhǔn)確率最大值,迭代時間平均值。
與之對應(yīng)的5層,7層,9層網(wǎng)絡(luò)的結(jié)構(gòu)是
(mnist 0 ,mnist 2)81-30-49-30-2-(1,0) || (0,1)
(mnist 0 ,mnist 2)81-30-49-30-49-30-2-(1,0) || (0,1)
(mnist 0 ,mnist 2)81-30-49-30-49-30-49-30-2-(1,0) || (0,1)
?
首先比較平均準(zhǔn)確率
| ? | 9 | 7 | 5 | 3 |
| δ | 平均準(zhǔn)確率p-ave | 平均準(zhǔn)確率p-ave | 平均準(zhǔn)確率p-ave | 平均準(zhǔn)確率p-ave |
| 0.5 | 0.504318 | 0.499258 | 0.5048 | 0.527528 |
| 0.4 | 0.628378 | 0.65161 | 0.650711 | 0.559235 |
| 0.3 | 0.717866 | 0.751404 | 0.781075 | 0.685667 |
| 0.2 | 0.768787 | 0.798975 | 0.841833 | 0.797262 |
| 0.1 | 0.822365 | 0.855835 | 0.90255 | 0.911606 |
| 0.01 | 0.885606 | 0.914883 | 0.940618 | 0.960129 |
| 0.001 | 0.964507 | 0.968176 | 0.962292 | 0.975169 |
| 9.00E-04 | 0.958186 | 0.964025 | 0.962399 | 0.975409 |
| 8.00E-04 | 0.957866 | 0.966742 | 0.962297 | 0.976148 |
| 7.00E-04 | 0.959747 | 0.965081 | 0.964744 | 0.976238 |
| 6.00E-04 | 0.961562 | 0.967584 | 0.96621 | 0.976875 |
| 5.00E-04 | 0.96402 | 0.970022 | 0.966013 | 0.977357 |
| 4.00E-04 | 0.964397 | 0.970069 | 0.967576 | 0.977389 |
| 3.00E-04 | 0.974038 | 0.972639 | 0.96951 | 0.979382 |
| 2.00E-04 | 0.976892 | 0.976308 | 0.973973 | 0.97974 |
| 1.00E-04 | 0.981266 | 0.979532 | 0.979585 | 0.981728 |
| 9.00E-05 | 0.98216 | 0.98187 | 0.979785 | 0.981758 |
| 8.00E-05 | 0.983049 | 0.980691 | 0.980499 | 0.982055 |
| 7.00E-05 | 0.98484 | 0.980884 | 0.982065 | 0.982707 |
| 6.00E-05 | 0.985354 | 0.980816 | 0.981708 | 0.982557 |
| 5.00E-05 | 0.985219 | 0.981823 | 0.982092 | 0.982902 |
| 4.00E-05 | 0.984175 | 0.9817 | 0.982372 | 0.983454 |
| 3.00E-05 | 0.986453 | 0.982784 | 0.98149 | 0.983354 |
| 2.00E-05 | 0.987093 | 0.986064 | 0.983061 | 0.983821 |
| 1.00E-05 | 0.991136 | 0.990072 | 0.983126 | 0.983631 |
| 9.00E-06 | 0.990132 | 0.990562 | 0.983663 | 0.983736 |
| 8.00E-06 | 0.990996 | 0.990649 | 0.98411 | 0.984148 |
| 7.00E-06 | 0.991066 | 0.991853 | 0.98446 | 0.983961 |
| 6.00E-06 | 0.991611 | 0.991803 | 0.985444 | 0.9844 |
| 5.00E-06 | 0.992417 | 0.99206 | 0.985239 | 0.984138 |
| 4.00E-06 | 0.989972 | 0.9923 | 0.985756 | 0.984478 |
| 3.00E-06 | 0.992362 | 0.992355 | 0.985749 | 0.9849 |
| 2.00E-06 | 0.992375 | 0.992392 | 0.988336 | 0.98498 |
| 1.00E-06 | 0.992412 | 0.99231 | 0.98973 | 0.985886 |
?
這4組數(shù)據(jù)還是比較清晰的體現(xiàn)了在迭代停止標(biāo)準(zhǔn)相同的前提下網(wǎng)絡(luò)的層數(shù)越多網(wǎng)絡(luò)的平均準(zhǔn)確率越大
9>7>5>3
?
再比較最大性能
| ? | 9 | 7 | 5 | 3 |
| δ | 最大值p-max | 最大值p-max | 最大值p-max | 最大值p-max |
| 0.5 | 0.76839 | 0.717197 | 0.880716 | 0.804672 |
| 0.4 | 0.946322 | 0.935388 | 0.928926 | 0.818588 |
| 0.3 | 0.949304 | 0.95825 | 0.951789 | 0.917992 |
| 0.2 | 0.960239 | 0.959245 | 0.959742 | 0.963718 |
| 0.1 | 0.964712 | 0.966203 | 0.965209 | 0.968688 |
| 0.01 | 0.979622 | 0.976143 | 0.977634 | 0.977634 |
| 0.001 | 0.989066 | 0.987575 | 0.985586 | 0.982604 |
| 9.00E-04 | 0.988569 | 0.988072 | 0.987078 | 0.983101 |
| 8.00E-04 | 0.989066 | 0.989563 | 0.99006 | 0.983101 |
| 7.00E-04 | 0.99006 | 0.988569 | 0.988569 | 0.985586 |
| 6.00E-04 | 0.990557 | 0.989066 | 0.989563 | 0.986581 |
| 5.00E-04 | 0.99006 | 0.988569 | 0.988072 | 0.986581 |
| 4.00E-04 | 0.991054 | 0.990557 | 0.988072 | 0.985089 |
| 3.00E-04 | 0.992545 | 0.991054 | 0.989066 | 0.986083 |
| 2.00E-04 | 0.99503 | 0.992048 | 0.99006 | 0.985089 |
| 1.00E-04 | 0.99503 | 0.994036 | 0.992545 | 0.987078 |
| 9.00E-05 | 0.994533 | 0.994533 | 0.991054 | 0.987078 |
| 8.00E-05 | 0.994533 | 0.993539 | 0.992048 | 0.987575 |
| 7.00E-05 | 0.995527 | 0.994036 | 0.992545 | 0.988072 |
| 6.00E-05 | 0.994533 | 0.994036 | 0.992048 | 0.987575 |
| 5.00E-05 | 0.995527 | 0.994036 | 0.993042 | 0.988072 |
| 4.00E-05 | 0.995527 | 0.994036 | 0.992545 | 0.988072 |
| 3.00E-05 | 0.995527 | 0.994533 | 0.993042 | 0.988569 |
| 2.00E-05 | 0.99503 | 0.995527 | 0.994036 | 0.987575 |
| 1.00E-05 | 0.994533 | 0.99503 | 0.994533 | 0.988569 |
| 9.00E-06 | 0.99503 | 0.99503 | 0.994533 | 0.989066 |
| 8.00E-06 | 0.99503 | 0.994533 | 0.994036 | 0.988569 |
| 7.00E-06 | 0.995527 | 0.995527 | 0.994036 | 0.988072 |
| 6.00E-06 | 0.994533 | 0.99503 | 0.994533 | 0.989066 |
| 5.00E-06 | 0.99503 | 0.99503 | 0.994036 | 0.988072 |
| 4.00E-06 | 0.99503 | 0.994533 | 0.994533 | 0.989563 |
| 3.00E-06 | 0.994533 | 0.995527 | 0.994036 | 0.989066 |
| 2.00E-06 | 0.995527 | 0.995527 | 0.994533 | 0.988569 |
| 1.00E-06 | 0.995527 | 0.994533 | 0.995527 | 0.99006 |
這組數(shù)據(jù)再次清晰的體現(xiàn)了隨著網(wǎng)絡(luò)層數(shù)的增加網(wǎng)絡(luò)的性能隨之增加,特別是網(wǎng)絡(luò)由3層加至5層以后性能提升非常明顯。但7層和9層的網(wǎng)絡(luò)當(dāng)δ比較小的時候曲線已經(jīng)高度重合,表明7層或9層的網(wǎng)絡(luò)在δ比較小的區(qū)間的性能差異已經(jīng)很難體現(xiàn)。
9>7>5>3
?
比較迭代次數(shù)
| ? | 9 | 7 | 5 | 3 |
| δ | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n |
| 0.5 | 8.291457 | 7.628141 | 5.728643 | 4.824121 |
| 0.4 | 334.3869 | 136.5377 | 47.92965 | 10.60302 |
| 0.3 | 445.608 | 223.8141 | 105.6432 | 32.92462 |
| 0.2 | 500.1307 | 275.8442 | 155.2563 | 68.78894 |
| 0.1 | 612.9146 | 369.5226 | 248.9497 | 155.2965 |
| 0.01 | 1085.503 | 754.2462 | 596.3015 | 492.8593 |
| 0.001 | 9882.784 | 8027.377 | 2793.01 | 1295.281 |
| 9.00E-04 | 10881.03 | 8691.206 | 2924.266 | 1368.503 |
| 8.00E-04 | 11977.38 | 9745.246 | 3438.271 | 1426.709 |
| 7.00E-04 | 14072.29 | 10714.58 | 4023.141 | 1494.201 |
| 6.00E-04 | 16406.42 | 12371.1 | 4890.673 | 1667.829 |
| 5.00E-04 | 20385.63 | 15137.29 | 5992.065 | 1749.307 |
| 4.00E-04 | 24298.51 | 17785.58 | 7844.638 | 1875.171 |
| 3.00E-04 | 32696.08 | 22253.22 | 11235.22 | 2184.286 |
| 2.00E-04 | 44724.82 | 31035.44 | 15313.87 | 2582.925 |
| 1.00E-04 | 89078.6 | 56299.69 | 25407.06 | 3498.412 |
| 9.00E-05 | 95407.9 | 63010.57 | 27220.85 | 3645.025 |
| 8.00E-05 | 104874.4 | 68325.11 | 29562.66 | 3840.156 |
| 7.00E-05 | 116214.4 | 78167.16 | 32122.32 | 4077.126 |
| 6.00E-05 | 131232.3 | 89236.13 | 34942.84 | 4212.678 |
| 5.00E-05 | 149461.3 | 102580.9 | 39240.9 | 4589.568 |
| 4.00E-05 | 166924.9 | 117010.6 | 42965.2 | 5167.663 |
| 3.00E-05 | 204507.9 | 149188.4 | 52871.19 | 5821.111 |
| 2.00E-05 | 274629 | 212703 | 64717.94 | 6976.513 |
| 1.00E-05 | 439076.3 | 360851.1 | 90076 | 9615.879 |
| 9.00E-06 | 473836.4 | 386946.7 | 91610.54 | 9692.05 |
| 8.00E-06 | 514704.1 | 429464.9 | 99462.98 | 10012.85 |
| 7.00E-06 | 550991.1 | 455372.7 | 105727.8 | 10419.32 |
| 6.00E-06 | 616058.6 | 535610.7 | 110838.9 | 11089.11 |
| 5.00E-06 | 742561 | 608267.8 | 118164.4 | 12141.85 |
| 4.00E-06 | 892665.6 | 729212.1 | 138541.7 | 12888.37 |
| 3.00E-06 | 1155870 | 930735.7 | 155032.7 | 13944.59 |
| 2.00E-06 | 1.69E+06 | 1390712 | 189751.4 | 16152.7 |
| 1.00E-06 | 3.35E+06 | 2727215 | 318306.6 | 20551.51 |
隨著網(wǎng)絡(luò)層數(shù)的增加迭代次數(shù)大比例的增加,比較當(dāng)δ=1e-6時的數(shù)據(jù)
| ? | 9 | 7 | 5 | 3 |
| δ | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n |
| 1.00E-06 | 3.35E+06 | 2727215 | 318306.6 | 20551.51 |
| ? | ? | ? | ? | ? |
| ? | 1.228442 | 8.567887 | 15.48824 | ? |
對比數(shù)據(jù)n9/n7=1.22,n7/n5=8.56,n5/n3=15.48
可以明顯觀察到隨著層數(shù)的增加迭代次數(shù)是增加的,但隨著層數(shù)的增加迭代次數(shù)增加的速度是減慢的。
9>7>5>3
?
最后比較收斂時間
| ? | 9 | 7 | 5 | 3 |
| δ | 耗時 min/199 | 耗時 min/199 | 耗時 min/199 | 耗時 min/199 |
| 0.5 | 0.409583 | 0.297767 | 0.191367 | 0.0586 |
| 0.4 | 0.547117 | 0.333867 | 0.192717 | 0.05605 |
| 0.3 | 0.592417 | 0.3599 | 0.203 | 0.057967 |
| 0.2 | 0.6182 | 0.375717 | 0.219817 | 0.0597 |
| 0.1 | 0.664517 | 0.404467 | 0.23055 | 0.063883 |
| 0.01 | 0.865933 | 0.52845 | 0.299283 | 0.084767 |
| 0.001 | 4.660217 | 2.794767 | 0.72315 | 0.134933 |
| 9.00E-04 | 5.107717 | 3.0043 | 0.748283 | 0.136217 |
| 8.00E-04 | 5.547917 | 3.32935 | 0.849567 | 0.140483 |
| 7.00E-04 | 6.4496 | 3.633417 | 0.961167 | 0.144367 |
| 6.00E-04 | 7.462333 | 4.14635 | 1.127583 | 0.154583 |
| 5.00E-04 | 9.166217 | 5.0117 | 1.344267 | 0.158483 |
| 4.00E-04 | 10.83363 | 5.847867 | 1.699267 | 0.166983 |
| 3.00E-04 | 14.45065 | 7.23295 | 2.354367 | 0.186433 |
| 2.00E-04 | 18.27553 | 9.96255 | 3.1458 | 0.209817 |
| 1.00E-04 | 38.97403 | 17.8287 | 5.095617 | 0.279333 |
| 9.00E-05 | 40.24977 | 19.8958 | 5.439967 | 0.27905 |
| 8.00E-05 | 44.66172 | 20.44067 | 5.888667 | 0.2912 |
| 7.00E-05 | 50.07025 | 25.11477 | 6.383417 | 0.307417 |
| 6.00E-05 | 56.32692 | 28.81148 | 6.927333 | 0.311583 |
| 5.00E-05 | 64.26778 | 33.43728 | 7.758767 | 0.3372 |
| 4.00E-05 | 71.88765 | 35.4373 | 8.501183 | 0.37535 |
| 3.00E-05 | 87.45185 | 46.21853 | 9.577633 | 0.415583 |
| 2.00E-05 | 117.4416 | 66.7971 | 13.08162 | 0.481717 |
| 1.00E-05 | 188.3502 | 111.3974 | 18.13227 | 0.642817 |
| 9.00E-06 | 205.6579 | 119.7637 | 18.41502 | 0.646617 |
| 8.00E-06 | 221.6506 | 133.2785 | 19.11077 | 0.6669 |
| 7.00E-06 | 236.5716 | 139.6939 | 21.95412 | 0.688267 |
| 6.00E-06 | 267.6226 | 168.1909 | 20.1341 | 0.7378 |
| 5.00E-06 | 318.1124 | 188.6062 | 24.30287 | 0.796267 |
| 4.00E-06 | 381.6106 | 227.9598 | 27.94432 | 0.84375 |
| 3.00E-06 | 492.3802 | 290.9228 | 29.18535 | 0.9145 |
| 2.00E-06 | 724.5874 | 431.3575 | 37.93767 | 1.047 |
| 1.00E-06 | 1420.324 | 839.3905 | 62.56628 | 1.3132 |
?
這個規(guī)律也是無比明顯的,收斂時間隨著層數(shù)的增加而增加。
?
| ? | 9 | 7 | 5 | 3 |
| δ | 耗時 min/199 | 耗時 min/199 | 耗時 min/199 | 耗時 min/199 |
| 1.00E-06 | 1420.324 | 839.3905 | 62.56628 | 1.3132 |
| ? | 1.692089 | 13.41602 | 47.64414 | ? |
?
當(dāng)δ=1e-6時t9/t7=1.69,t7/t5=13.41,t5/t3=47.64
9>7>5>3
總結(jié)這4個表格
平均準(zhǔn)確率,最大準(zhǔn)確率,迭代次數(shù),收斂時間的順序都是
9>7>5>3
網(wǎng)絡(luò)層數(shù)越多網(wǎng)絡(luò)分類能力越強(qiáng),需要的迭代次數(shù)越多,時間越長。
但是考慮到在δ比較小的區(qū)間7層和9層網(wǎng)絡(luò)的性能差異已經(jīng)不大,所以對于這道題一個比較經(jīng)濟(jì)的參數(shù)設(shè)置方案是用7層網(wǎng)絡(luò),收斂標(biāo)準(zhǔn)δ=5e-6,或者設(shè)定迭代次數(shù)n=608267.預(yù)估收斂時間為56秒,68%的概率準(zhǔn)確率在99.011%-99.401%之間。有不小于0.5025%的概率拿到99.503%。
總結(jié)
以上是生活随笔為你收集整理的3层,5层,7层,9层网络性能比较-0-2的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 神工007官网电话(神工007官网)
- 下一篇: 调参总结