制作一个二分类的网络来分类mnist的0和5,并向网络上加卷积核从1个核到9个核。
网络的结构是
(mnist 0 ,mnist9)81-con(3*3)*n-(49*n)-30-2-(1,0) || (0,1)
将mnist的28*28的图片压缩到9*9,用n个3*3的卷积核,节点数分别为n*49,30,2。让0向(1,0)收敛,让5向(0,1)收敛,让n分别等于1-9.
与Tensorflow不同的是这个网络通过网络的输出值与目标函数的绝对误差判断是否停止:
if (Math.abs(网路输出值[0]-目标函数[0])< δ && Math.abs(网络输出值[1]-目标函数[1])< δ ),
其中δ分别等于0.5到1e-6.的34个值。对应每个δ收敛199次,分别记录与之对应的迭代次数,收敛时间,并计算199次的平均准确率和199次的最大准确率,来比较这10个网络的性能差异。
首先比较最大准确率
81-30-2 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
|
δ |
最大值p-max |
最大值p-max |
最大值p-max |
最大值p-max |
最大值p-max |
最大值p-max |
最大值p-max |
最大值p-max |
最大值p-max |
最大值p-max |
0.5 |
0.7948718 |
0.6730769 |
0.7692308 |
0.7638889 |
0.8178419 |
0.7820513 |
0.8012821 |
0.9027778 |
0.8904915 |
0.767094 |
0.4 |
0.9428419 |
0.9636752 |
0.9604701 |
0.9620727 |
0.9529915 |
0.9583333 |
0.9610043 |
0.9636752 |
0.9465812 |
0.9519231 |
0.3 |
0.9524573 |
0.9711538 |
0.9679487 |
0.9594017 |
0.9599359 |
0.9513889 |
0.9487179 |
0.9567308 |
0.9444444 |
0.9428419 |
0.2 |
0.9626068 |
0.9647436 |
0.9604701 |
0.9604701 |
0.9535256 |
0.9465812 |
0.9481838 |
0.9540598 |
0.9508547 |
0.9444444 |
0.1 |
0.9674145 |
0.9674145 |
0.9647436 |
0.9652778 |
0.957265 |
0.957265 |
0.9540598 |
0.9503205 |
0.954594 |
0.9449786 |
0.01 |
0.9695513 |
0.9700855 |
0.971688 |
0.9684829 |
0.9679487 |
0.9668803 |
0.9684829 |
0.9732906 |
0.9706197 |
0.971688 |
0.001 |
0.9775641 |
0.9727564 |
0.9797009 |
0.9807692 |
0.9807692 |
0.9807692 |
0.9786325 |
0.9818376 |
0.9823718 |
0.980235 |
9.00E-04 |
0.9775641 |
0.9738248 |
0.9813034 |
0.9818376 |
0.9807692 |
0.9813034 |
0.9807692 |
0.9823718 |
0.9818376 |
0.9818376 |
8.00E-04 |
0.9775641 |
0.9754274 |
0.9807692 |
0.9813034 |
0.9823718 |
0.9823718 |
0.982906 |
0.9823718 |
0.982906 |
0.9818376 |
7.00E-04 |
0.9770299 |
0.971688 |
0.9818376 |
0.982906 |
0.9834402 |
0.982906 |
0.982906 |
0.9818376 |
0.982906 |
0.9834402 |
6.00E-04 |
0.9770299 |
0.9727564 |
0.982906 |
0.982906 |
0.9839744 |
0.9834402 |
0.9823718 |
0.9839744 |
0.9834402 |
0.9823718 |
5.00E-04 |
0.9759615 |
0.9754274 |
0.9823718 |
0.9839744 |
0.9850427 |
0.9823718 |
0.9839744 |
0.9834402 |
0.9839744 |
0.9839744 |
4.00E-04 |
0.974359 |
0.9748932 |
0.9834402 |
0.982906 |
0.9839744 |
0.9839744 |
0.9845085 |
0.9845085 |
0.9850427 |
0.9850427 |
3.00E-04 |
0.980235 |
0.9770299 |
0.9845085 |
0.9866453 |
0.9845085 |
0.9839744 |
0.9855769 |
0.9850427 |
0.9855769 |
0.9850427 |
2.00E-04 |
0.980235 |
0.9754274 |
0.9855769 |
0.9861111 |
0.9866453 |
0.9850427 |
0.9850427 |
0.9861111 |
0.9861111 |
0.9866453 |
1.00E-04 |
0.9807692 |
0.9786325 |
0.9866453 |
0.9877137 |
0.9866453 |
0.9850427 |
0.9861111 |
0.9866453 |
0.9861111 |
0.9850427 |
9.00E-05 |
0.9807692 |
0.9775641 |
0.9861111 |
0.9871795 |
0.9877137 |
0.9871795 |
0.9855769 |
0.9866453 |
0.9861111 |
0.9855769 |
8.00E-05 |
0.9807692 |
0.9764957 |
0.9887821 |
0.9882479 |
0.9871795 |
0.9882479 |
0.9866453 |
0.9877137 |
0.9861111 |
0.9855769 |
7.00E-05 |
0.9807692 |
0.9775641 |
0.9887821 |
0.9877137 |
0.9877137 |
0.9903846 |
0.9871795 |
0.9877137 |
0.9871795 |
0.9871795 |
6.00E-05 |
0.9813034 |
0.9791667 |
0.9882479 |
0.9877137 |
0.9887821 |
0.9903846 |
0.9882479 |
0.9877137 |
0.9866453 |
0.9871795 |
5.00E-05 |
0.9807692 |
0.9780983 |
0.9898504 |
0.9887821 |
0.9882479 |
0.9898504 |
0.9882479 |
0.9877137 |
0.9866453 |
0.9882479 |
4.00E-05 |
0.9797009 |
0.9775641 |
0.9893162 |
0.9898504 |
0.9898504 |
0.9903846 |
0.9887821 |
0.9887821 |
0.9866453 |
0.9866453 |
3.00E-05 |
0.9797009 |
0.980235 |
0.9898504 |
0.9887821 |
0.9893162 |
0.9925214 |
0.9887821 |
0.9877137 |
0.9882479 |
0.9882479 |
2.00E-05 |
0.9791667 |
0.9813034 |
0.991453 |
0.9887821 |
0.9909188 |
0.991453 |
0.9898504 |
0.9882479 |
0.9882479 |
0.9877137 |
1.00E-05 |
0.9813034 |
0.9845085 |
0.9903846 |
0.9903846 |
0.9903846 |
0.991453 |
0.9909188 |
0.9887821 |
0.9882479 |
0.9893162 |
9.00E-06 |
0.9813034 |
0.9845085 |
0.9909188 |
0.991453 |
0.9903846 |
0.9919872 |
0.9893162 |
0.9893162 |
0.9893162 |
0.9903846 |
8.00E-06 |
0.9813034 |
0.982906 |
0.991453 |
0.991453 |
0.9903846 |
0.9925214 |
0.9893162 |
0.9893162 |
0.9893162 |
0.991453 |
7.00E-06 |
0.9813034 |
0.9850427 |
0.9909188 |
0.9925214 |
0.9909188 |
0.9919872 |
0.991453 |
0.9898504 |
0.9898504 |
0.9909188 |
6.00E-06 |
0.9818376 |
0.9839744 |
0.9893162 |
0.991453 |
0.9925214 |
0.991453 |
0.9893162 |
0.9893162 |
0.9909188 |
0.9909188 |
5.00E-06 |
0.9818376 |
0.9850427 |
0.991453 |
0.9935897 |
0.991453 |
0.9925214 |
0.9909188 |
0.9903846 |
0.9903846 |
0.9893162 |
4.00E-06 |
0.9813034 |
0.9866453 |
0.9935897 |
0.9930556 |
0.9930556 |
0.9925214 |
0.9919872 |
0.9898504 |
0.991453 |
0.9898504 |
3.00E-06 |
0.9834402 |
0.9855769 |
0.9930556 |
0.9930556 |
0.9919872 |
0.9919872 |
0.9925214 |
0.9909188 |
0.9903846 |
0.9909188 |
2.00E-06 |
0.9861111 |
0.9871795 |
0.9951923 |
0.9935897 |
0.9925214 |
0.9930556 |
0.991453 |
0.9909188 |
0.9925214 |
0.9919872 |
1.00E-06 |
0.9882479 |
0.9893162 |
0.9951923 |
0.9946581 |
0.9930556 |
0.9935897 |
0.9941239 |
0.9903846 |
0.9909188 |
2>3>4>5>6>7>8>9>1>81-30-2
随着卷积核数量的增加网络的最大性能先上升,当n=2时最大性能到达顶点,然后随着卷积核数量的增加最大性能开始下降。最大准确率曲线是一条开口向下有极大值的曲线。原始的未加卷积核的网络81-30-2的最大性能小于1个卷积核的网络。
2.比较平均性能
81-30-2 |
1 |
81-30-2 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
|
δ |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
平均准确率p-ave |
0.5 |
0.5335518 |
0.5023891 |
0.5335518 |
0.5185033 |
0.5139963 |
0.5152579 |
0.5164525 |
0.5226802 |
0.5270476 |
0.5192549 |
0.5158699 |
0.4 |
0.9188652 |
0.715718 |
0.9188652 |
0.7907755 |
0.7566518 |
0.7538386 |
0.7368949 |
0.7321302 |
0.7023123 |
0.7222598 |
0.6953357 |
0.3 |
0.9282497 |
0.8465807 |
0.9282497 |
0.8974064 |
0.882833 |
0.8699158 |
0.8699427 |
0.8521937 |
0.8459364 |
0.8328636 |
0.8368579 |
0.2 |
0.9465731 |
0.8818961 |
0.9465731 |
0.9070137 |
0.9074754 |
0.9003296 |
0.8978654 |
0.891082 |
0.8898338 |
0.8887493 |
0.8770884 |
0.1 |
0.9638148 |
0.904426 |
0.9638148 |
0.925815 |
0.9159687 |
0.9124039 |
0.9085143 |
0.9077116 |
0.9094189 |
0.9066137 |
0.8981714 |
0.01 |
0.9656402 |
0.9115181 |
0.9656402 |
0.9400233 |
0.9378436 |
0.9272887 |
0.9153996 |
0.9101195 |
0.8945395 |
0.8760925 |
0.8632318 |
0.001 |
0.9733148 |
0.903261 |
0.9733148 |
0.9617666 |
0.9538988 |
0.9504923 |
0.9438888 |
0.9492763 |
0.9436687 |
0.9433546 |
0.9410273 |
9.00E-04 |
0.9732342 |
0.9092202 |
0.9732342 |
0.9617237 |
0.959391 |
0.9572381 |
0.9567335 |
0.9579441 |
0.9562127 |
0.9571683 |
0.957469 |
8.00E-04 |
0.9731752 |
0.9105597 |
0.9731752 |
0.9651006 |
0.9609909 |
0.9641101 |
0.9621747 |
0.9644993 |
0.9630471 |
0.963235 |
0.9646228 |
7.00E-04 |
0.9728396 |
0.9110295 |
0.9728396 |
0.9668911 |
0.9688614 |
0.9664025 |
0.9659999 |
0.9659167 |
0.9660213 |
0.9664857 |
0.9644107 |
6.00E-04 |
0.972088 |
0.9108899 |
0.972088 |
0.9669609 |
0.9673796 |
0.9678467 |
0.9679487 |
0.9702761 |
0.968491 |
0.9676266 |
0.9660562 |
5.00E-04 |
0.9712746 |
0.91475 |
0.9712746 |
0.9700989 |
0.9727215 |
0.9699244 |
0.9717149 |
0.9708988 |
0.9723618 |
0.9699405 |
0.9666226 |
4.00E-04 |
0.9715672 |
0.9135072 |
0.9715672 |
0.9737657 |
0.9747079 |
0.9734731 |
0.9730758 |
0.971782 |
0.9713095 |
0.969111 |
0.9680266 |
3.00E-04 |
0.9745925 |
0.9094457 |
0.9745925 |
0.9743348 |
0.9740825 |
0.9747589 |
0.9730946 |
0.973347 |
0.9713632 |
0.9704801 |
0.9671756 |
2.00E-04 |
0.9764313 |
0.9190611 |
0.9764313 |
0.9768259 |
0.9767105 |
0.9756475 |
0.9741845 |
0.97361 |
0.9727269 |
0.9698841 |
0.9705338 |
1.00E-04 |
0.974861 |
0.9286497 |
0.974861 |
0.9799156 |
0.9793089 |
0.9780527 |
0.9642336 |
0.9778218 |
0.9756877 |
0.9740288 |
0.9741818 |
9.00E-05 |
0.9772608 |
0.9331299 |
0.9772608 |
0.9800069 |
0.9808605 |
0.9800767 |
0.9738677 |
0.9778057 |
0.9762783 |
0.9761038 |
0.9755294 |
8.00E-05 |
0.9783614 |
0.9257693 |
0.9783614 |
0.9808605 |
0.9806753 |
0.9799559 |
0.9765226 |
0.9771158 |
0.9773332 |
0.9777574 |
0.9743321 |
7.00E-05 |
0.9792284 |
0.9319353 |
0.9792284 |
0.9824067 |
0.9817651 |
0.9803397 |
0.9770541 |
0.9789546 |
0.9781359 |
0.9778862 |
0.9747938 |
6.00E-05 |
0.9795801 |
0.9219656 |
0.9795801 |
0.9829301 |
0.982557 |
0.9810135 |
0.9779963 |
0.9785681 |
0.9776339 |
0.9779855 |
0.9760931 |
5.00E-05 |
0.9791157 |
0.9300589 |
0.9791157 |
0.9827771 |
0.9829543 |
0.9817973 |
0.9796579 |
0.979172 |
0.9777976 |
0.978509 |
0.9770031 |
4.00E-05 |
0.9788687 |
0.9251224 |
0.9788687 |
0.9837918 |
0.9830295 |
0.9820577 |
0.9800901 |
0.9799666 |
0.9777332 |
0.9780849 |
0.9777252 |
3.00E-05 |
0.9788338 |
0.9216435 |
0.9788338 |
0.9843529 |
0.9833382 |
0.982761 |
0.9820014 |
0.9799344 |
0.9789143 |
0.9786701 |
0.978458 |
2.00E-05 |
0.9787935 |
0.9209053 |
0.9787935 |
0.9851286 |
0.9840307 |
0.9831154 |
0.9828738 |
0.9804498 |
0.9805196 |
0.9794861 |
0.9773708 |
1.00E-05 |
0.9783506 |
0.9308052 |
0.9783506 |
0.9853568 |
0.9842133 |
0.983816 |
0.9837516 |
0.9821114 |
0.980788 |
0.9797116 |
0.9699244 |
9.00E-06 |
0.9782352 |
0.9433573 |
0.9782352 |
0.9860467 |
0.9852763 |
0.9841811 |
0.9850052 |
0.982251 |
0.9801438 |
0.9727725 |
0.9775775 |
8.00E-06 |
0.9781332 |
0.9331621 |
0.9781332 |
0.9865191 |
0.9859098 |
0.9846642 |
0.9850266 |
0.9828496 |
0.9793895 |
0.979062 |
0.9805652 |
7.00E-06 |
0.9782218 |
0.9447344 |
0.9782218 |
0.9865809 |
0.9862749 |
0.9853568 |
0.9853326 |
0.9829677 |
0.9815289 |
0.9789224 |
0.9794861 |
6.00E-06 |
0.9785761 |
0.9488844 |
0.9785761 |
0.977454 |
0.9866238 |
0.985687 |
0.985789 |
0.9829946 |
0.981145 |
0.979419 |
0.9815343 |
5.00E-06 |
0.9790861 |
0.9555389 |
0.9790861 |
0.9850374 |
0.9871016 |
0.9865594 |
0.9858937 |
0.9835368 |
0.9823423 |
0.98078 |
0.9820201 |
4.00E-06 |
0.9797331 |
0.9611895 |
0.9797331 |
0.9869164 |
0.9868413 |
0.9859554 |
0.9862158 |
0.9849837 |
0.9821651 |
0.9823557 |
0.9758005 |
3.00E-06 |
0.9802726 |
0.9644107 |
0.9802726 |
0.9879257 |
0.9874587 |
0.9862212 |
0.9863312 |
0.9837865 |
0.9817812 |
0.9826214 |
0.980525 |
2.00E-06 |
0.9802673 |
0.9657878 |
0.9802673 |
0.9891149 |
0.9884841 |
0.9874587 |
0.9860682 |
0.9850749 |
0.9843126 |
0.9839502 |
0.9819557 |
1.00E-06 |
0.9832684 |
0.9736745 |
0.9832684 |
0.9895203 |
0.9887123 |
0.9878694 |
0.9870292 |
0.9842428 |
0.9839717 |
0.9848495 |
2>3>4>5>6>7>8>9>81-30-2>1
平均性能也是一条开口向下有极大值的曲线,顶点在n=2,当n>2后随着卷积核的数量的增加网络的平均性能下降,原始的无卷积核的网络81-30-2的平均性能在9与1之间。
3.比较迭代次数
81-30-2 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
|
δ |
迭代次数n |
迭代次数n |
迭代次数n |
迭代次数n |
迭代次数n |
迭代次数n |
迭代次数n |
迭代次数n |
迭代次数n |
迭代次数n |
0.5 |
9.160804 |
18.492462 |
17.311558 |
15.743719 |
15.432161 |
16.346734 |
16.798995 |
15.236181 |
12.527638 |
13.844221 |
0.4 |
259.27136 |
2288.4774 |
298.56281 |
236.08543 |
220.34171 |
208.94472 |
193.33668 |
194.93467 |
195.60302 |
173.17588 |
0.3 |
344.46734 |
2537.2513 |
154.73367 |
144.78392 |
140.98995 |
135.54774 |
139.46734 |
136.20603 |
131.78392 |
131.72864 |
0.2 |
447.94472 |
2826.4472 |
163.06533 |
145.31156 |
138.14573 |
142.52261 |
136.78392 |
142.35678 |
140.75377 |
138.37688 |
0.1 |
546.02513 |
2872.4774 |
182.70352 |
173.42714 |
163.88442 |
170.22111 |
166.94975 |
168.49749 |
167.97487 |
173.1005 |
0.01 |
855.83417 |
3587.7035 |
444.98995 |
492.43719 |
505.8794 |
518.46734 |
518.61307 |
526.22111 |
532.85427 |
519.0201 |
0.001 |
1523.0955 |
4529.1508 |
1436.4573 |
1692.8995 |
1901.6985 |
1920.9749 |
1954.9246 |
1907.5427 |
1998.1508 |
2039.1859 |
9.00E-04 |
1575.8392 |
4472.7688 |
1420.0452 |
1642.4271 |
1883.0754 |
1885.6432 |
1929.2211 |
1934.4422 |
2052.6181 |
2154.0955 |
8.00E-04 |
1657.0251 |
4529.0201 |
1491.2211 |
1749.6633 |
1986.2864 |
1940.6734 |
2014.0603 |
1949.593 |
2134.1055 |
2116.809 |
7.00E-04 |
1715.8492 |
4662.1859 |
1720.3116 |
1978.9397 |
2035.6985 |
2038.5678 |
2104 |
2170.8995 |
2200.1709 |
2291.8492 |
6.00E-04 |
1784.804 |
4733.206 |
1785.5176 |
2072.6784 |
2165.9045 |
2188.9648 |
2285.201 |
2195.0503 |
2285.4774 |
2328.201 |
5.00E-04 |
1845.3668 |
4991.0704 |
1883.0553 |
2268.2965 |
2208.1809 |
2327.2211 |
2576.4874 |
2318.2412 |
2525.1106 |
2651.4774 |
4.00E-04 |
1991.608 |
5026.5327 |
2050.1407 |
2512.005 |
2483.1608 |
2693.8141 |
2735.6633 |
2599.0804 |
2686.9799 |
2738.3216 |
3.00E-04 |
2476.593 |
5324.7889 |
2454.9648 |
2812.5779 |
2978.3568 |
2997.9598 |
3013.9196 |
3046.5678 |
2939.8643 |
3272.7186 |
2.00E-04 |
2879.5678 |
5625.8291 |
2968.9749 |
3547.2362 |
3372.3266 |
3704.4573 |
3738.206 |
3535.6583 |
3900.3668 |
3865.3216 |
1.00E-04 |
3656.4422 |
6300.1558 |
4395.1256 |
4725.9799 |
4806.7839 |
5709.2111 |
5251.6784 |
5196.9196 |
5116.0603 |
5670.2764 |
9.00E-05 |
3871.3367 |
6393.1809 |
4249.2563 |
4417.4121 |
4810.5578 |
5519.6834 |
5046.7487 |
5074.6633 |
5158.3317 |
5383.608 |
8.00E-05 |
4092.3317 |
6461.5829 |
4191.804 |
4866.4171 |
4839.5729 |
5669.0302 |
5343.5427 |
5026.0251 |
5428.9749 |
5520.8291 |
7.00E-05 |
4245.1759 |
6737.6583 |
4436.8945 |
4731.3266 |
5093.0653 |
5754.7688 |
5417.1307 |
5070.9347 |
5305.6784 |
5715.3668 |
6.00E-05 |
4380.0302 |
7093.3367 |
4591.5427 |
4900.6734 |
4905.6784 |
6238.9397 |
5270.2764 |
5661.1055 |
5813.1759 |
5918.1759 |
5.00E-05 |
4537.1457 |
7531.8392 |
4661.5176 |
5124.5126 |
5510.2161 |
6595.4372 |
5685.5729 |
5880.8844 |
6158.4221 |
6208.3467 |
4.00E-05 |
4640.3417 |
7936.4372 |
4891.402 |
5516.794 |
6135.8945 |
7171.2362 |
6050.5879 |
6745.5779 |
6235.9447 |
6859.3417 |
3.00E-05 |
4661.799 |
9152.593 |
5546.593 |
6137.5879 |
6695.1457 |
8369.5477 |
6584.7889 |
6960.005 |
7222.0101 |
7973.3216 |
2.00E-05 |
4680.2814 |
11076.392 |
6096.0151 |
7011.6583 |
7930.3819 |
10117.513 |
7742.3618 |
8165.598 |
9197.5678 |
9313.9598 |
1.00E-05 |
5416.9347 |
21376.387 |
7696.7487 |
9081.0251 |
10953.553 |
13592.714 |
10608.905 |
11073.864 |
12293.543 |
26256.166 |
9.00E-06 |
5648.5528 |
23626.186 |
7388.9196 |
9121.7035 |
11644.558 |
13399.03 |
10421.492 |
11290.291 |
25672.563 |
28369.141 |
8.00E-06 |
5854.5126 |
22841.116 |
7448.0352 |
10441.879 |
12020.628 |
14497.573 |
10589.693 |
12226.497 |
24378.653 |
31408.497 |
7.00E-06 |
6466.8241 |
27217.905 |
8028.1106 |
10264.025 |
11424.136 |
15736 |
11804.558 |
12377.161 |
28071.392 |
32087.392 |
6.00E-06 |
7063.5276 |
29178.518 |
13824.156 |
10173.643 |
12465.075 |
14446.613 |
12330.91 |
13247.849 |
27945.513 |
31361.045 |
5.00E-06 |
8079.7688 |
32877.06 |
17375.497 |
10970.327 |
13638.372 |
15564.558 |
13761.432 |
15111.543 |
28023.92 |
31892.99 |
4.00E-06 |
9789.3668 |
38820.513 |
18059.628 |
10907.543 |
12893.543 |
16265.276 |
13874.136 |
15322.347 |
30350.889 |
43566.864 |
3.00E-06 |
12842.985 |
42096.995 |
17814.714 |
12538.608 |
14224.08 |
18842.116 |
15662.533 |
17281.513 |
33741 |
44026.899 |
2.00E-06 |
15130.764 |
45979.095 |
19888.558 |
14292.839 |
18005.352 |
23446.09 |
19432.312 |
20531.422 |
37886.804 |
53454.829 |
1.00E-06 |
22746.784 |
57660.256 |
22674.513 |
18676.844 |
25511.854 |
31373.98 |
46643.784 |
25671.94 |
58280.683 |
1>2>81-30-2>3<4<5<6<8<9
除了第7条曲线迭代次数大体上是开口向上有极小值的曲线,当n=3时有极小值,原始网络的迭代次数在2和3之间。
4.最后比较收敛时间
81-30-2 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
|
δ |
耗时 min/199 |
耗时 min/200 |
耗时 min/201 |
耗时 min/202 |
耗时 min/203 |
耗时 min/204 |
耗时 min/205 |
耗时 min/206 |
耗时 min/207 |
耗时 min/208 |
0.5 |
3.74165 |
2.81195 |
2.3356167 |
2.3812833 |
2.41515 |
2.9003 |
2.6563167 |
2.6037 |
2.84575 |
2.8494333 |
0.4 |
4.1931333 |
5.6846 |
2.7243167 |
2.70495 |
2.7242 |
3.2568667 |
2.9844 |
2.9688167 |
3.2323833 |
3.3662333 |
0.3 |
4.3721667 |
6.0041333 |
2.5128 |
2.6714667 |
2.6016333 |
3.1050333 |
2.8730167 |
2.8513333 |
3.10375 |
3.19675 |
0.2 |
1.8564 |
6.3734667 |
2.5300833 |
2.5535333 |
2.58635 |
3.0920333 |
2.86965 |
2.8619667 |
3.1330667 |
1.5324833 |
0.1 |
4.6676167 |
6.4437667 |
2.5244667 |
2.58445 |
2.62775 |
3.1427833 |
2.9340667 |
2.9192333 |
3.1962167 |
3.3199833 |
0.01 |
5.2088833 |
7.3604833 |
2.8403333 |
-0.58325 |
3.2821333 |
3.7929667 |
3.6354833 |
3.6760833 |
4.0656333 |
4.34505 |
0.001 |
6.3676667 |
8.5501167 |
4.1040667 |
4.81455 |
5.6036 |
6.4232333 |
6.4751 |
6.5676833 |
4.7247667 |
8.4573333 |
9.00E-04 |
6.4966833 |
8.4807667 |
4.0384333 |
4.78085 |
4.4528667 |
6.3847167 |
6.43075 |
6.62765 |
7.4476667 |
8.8073 |
8.00E-04 |
6.7034 |
8.5498333 |
4.0271167 |
4.902 |
5.7288833 |
6.3719 |
6.6306333 |
6.7841833 |
7.6419833 |
8.7222167 |
7.00E-04 |
6.75745 |
8.7181 |
4.40325 |
5.2740167 |
5.7882833 |
6.6370667 |
4.7293 |
7.3665333 |
7.8004667 |
9.1840167 |
6.00E-04 |
6.8404 |
8.80775 |
4.4865833 |
5.37725 |
5.97655 |
6.9272667 |
7.19365 |
7.2842667 |
7.9979 |
9.2548 |
5.00E-04 |
6.96285 |
9.1413333 |
4.6114333 |
5.5824167 |
6.0483333 |
4.6591833 |
7.75675 |
7.63485 |
8.5834667 |
4.68755 |
4.00E-04 |
7.2862 |
9.1793667 |
2.0086833 |
5.9000167 |
6.5423833 |
7.85475 |
8.1671333 |
8.3504167 |
8.9637333 |
10.353083 |
3.00E-04 |
5.5816667 |
9.5621333 |
5.3298333 |
6.3522167 |
7.35655 |
8.4423167 |
8.7433667 |
9.4013667 |
9.5543167 |
11.735717 |
2.00E-04 |
8.71945 |
9.94355 |
5.9963833 |
7.6161167 |
7.98195 |
9.8058333 |
10.35895 |
7.4389833 |
11.78 |
12.985167 |
1.00E-04 |
10.0387 |
10.8083 |
7.8396667 |
6.6227 |
8.08105 |
13.075883 |
10.481833 |
13.735567 |
14.89045 |
18.13725 |
9.00E-05 |
10.4178 |
10.913867 |
7.6425667 |
8.9246333 |
10.598233 |
12.833733 |
13.65385 |
13.224017 |
15.28805 |
12.19625 |
8.00E-05 |
10.768333 |
11.00325 |
7.6148167 |
9.4912 |
10.727383 |
13.143783 |
14.537217 |
13.125967 |
12.697583 |
17.459533 |
7.00E-05 |
11.03965 |
11.351883 |
7.8541833 |
9.2809 |
11.121167 |
13.43135 |
14.232983 |
13.212067 |
15.641267 |
17.93935 |
6.00E-05 |
10.08165 |
11.803567 |
8.0594 |
9.40985 |
10.833517 |
11.598917 |
13.148567 |
14.464867 |
16.658133 |
14.880983 |
5.00E-05 |
11.744183 |
11.558367 |
8.1961 |
9.7128333 |
11.570617 |
15.025217 |
9.5606 |
14.932633 |
17.066967 |
19.808217 |
4.00E-05 |
11.89545 |
13.316783 |
6.1954 |
10.30215 |
9.7710167 |
16.06235 |
14.383 |
16.738283 |
15.5816 |
21.337733 |
3.00E-05 |
11.962133 |
15.221267 |
9.3110833 |
8.50165 |
13.173067 |
15.182917 |
15.406933 |
15.875433 |
19.50825 |
17.410333 |
2.00E-05 |
11.947567 |
17.901783 |
10.009533 |
12.496633 |
15.301883 |
21.597833 |
17.651783 |
19.716983 |
24.296367 |
25.427117 |
1.00E-05 |
11.3564 |
28.662117 |
12.06555 |
15.452733 |
20.2102 |
27.94395 |
23.37535 |
25.817217 |
30.363617 |
66.972917 |
9.00E-06 |
13.647017 |
32.964433 |
11.656317 |
15.563267 |
19.6612 |
24.301083 |
23.03795 |
26.32625 |
62.753017 |
73.75985 |
8.00E-06 |
14.8104 |
31.809883 |
9.7350667 |
14.798517 |
21.876733 |
29.526217 |
20.793 |
29.18205 |
56.518383 |
78.87625 |
7.00E-06 |
19.61805 |
36.461317 |
12.50245 |
16.808383 |
19.1992 |
28.709183 |
25.774433 |
27.901667 |
65.33635 |
82.823083 |
6.00E-06 |
20.565867 |
32.756467 |
19.5214 |
16.716867 |
22.1395 |
29.47665 |
25.1147 |
32.154583 |
66.056617 |
78.91485 |
5.00E-06 |
20.4579 |
39.824267 |
23.790033 |
17.896783 |
23.918717 |
28.025917 |
30.541083 |
33.241817 |
67.500017 |
81.8001 |
4.00E-06 |
26.225617 |
43.384617 |
25.791183 |
17.6785 |
24.153483 |
31.654933 |
28.107583 |
34.056233 |
71.296233 |
112.10312 |
3.00E-06 |
30.387583 |
47.09945 |
25.603317 |
19.945967 |
26.7583 |
35.474967 |
34.3632 |
39.994767 |
80.6607 |
113.52042 |
2.00E-06 |
38.4815 |
50.440683 |
23.894317 |
20.51575 |
30.430383 |
43.04565 |
39.376083 |
46.21565 |
87.64325 |
148.69013 |
1.00E-06 |
52.468967 |
64.474033 |
32.313933 |
28.640433 |
46.072367 |
57.658567 |
93.034733 |
56.501933 |
133.82317 |
1>81-30-2>2>3<4<5<6<8<9
与迭代次数类似曲线也是开口向上的曲线,当n=3时耗时最少
所以综合上面的4个表格
最大性能:2>3>4>5>6>7>8>9>1>81-30-2
平均性能:2>3>4>5>6>7>8>9>81-30-2>1
迭代次数:1>2>81-30-2>3<4<5<6<8<9
收敛时间:1>81-30-2>2>3<4<5<6<8<9
因此对于这个网络无论更在乎最大性能还是平均性能都应该选择2个卷积核,因为n=2同时是这个网络在1-9个卷积核内平均性能和最大性能的极大值。
如果更在乎收敛效率也可以选择3个卷积核,3比2的性能稍差但需要的迭代次数只有2的82%,可以节省些时间。
如果选择了8个卷积核当收敛标准δ=1e-6的时候要比2个卷积核多付出2.57倍的计算量但最大性能比n=2的网络还是要差0.5%.因此就这个网络来说卷积核的数量肯定不是越多越好,当卷积核的数量超过2个以后卷积核的数量对网络的性能已经没有任何正面价值,而且数量越多越慢性能也越差。
实验数据
学习率r=0.1
权重初始化方式 |
Random rand1 =new Random(); |
int ti1=rand1.nextInt(98)+1; |
int xx=1; |
if(ti1%2==0) |
{ xx=-1;} |
tw[a][b]=xx*((double)ti1/x); |
第一层第二层和卷积核的权重的初始化的x分别为1000,1000,200 |