( A, B )---25*30*2---( 1, 0 )( 0, 1 )
做一个二分类的网络分类A和B,让A和B的训练集中都有多张图片,用一种平均值的办法把多张图片等效成两张图片,统计两张图片的移位距离,并比较移位距离和迭代次数的关系。
设AB训练集都只有两张图片,计算平均值
a8=(a0+a4)/2
a9=(a1+a5)/2
a10=(a2+a6)/2
a11=(a3+a7)/2
b8=(b0+b4)/2
b9=(b1+b5)/2
b10=(b2+b6)/2
b11=(b3+b7)/2
得到两张平均值图片
则网络( A A1, B B1 )---25*30*2---( 1, 0 )( 0, 1 )
的平均移位距离为
S=|a8-b8|+|a9-b9|+|a10-b10|+|a11-b11|
让收敛误差为7e-4,每个收敛误差统计199次,让训练集中图片的数量分别为1,2,5,10,20,50,100,500,1000,2000,3000,统计迭代次数和移位距离,并比较二者的关系。得到数据
5*5 | 1 | |||||||||
1 | 1 | 3 | 1 | 2 | 2 | 0 | 0 | 0 | 0 | |
3 | 4 | 4 | 2 | 4 | 3 | 1 | 2 | 3 | 4 | |
s | 2.74902 | 3.505882 | 3.737255 | 4.368627 | 5.231373 | 5.713725 | 7.062745 | 7.611765 | 8.556863 | 10.08235 |
7.00E-04 | 16024.14 | 13818.86 | 12726.82 | 11594.23 | 10989.32 | 10432.77 | 9773.97 | 9348.141 | 9022.221 | 8341.96 |
5*5 | 2 | |||||||||
1 | 2 | 0 | 2 | 0 | 1 | 0 | 3 | 1 | 0 | |
2 | 3 | 2 | 4 | 1 | 3 | 3 | 4 | 4 | 4 | |
s | 4.282353 | 4.327451 | 6.478431 | 5.045098 | 5.054902 | 3.35098 | 5.84902 | 5.011765 | 4.582353 | 7.75098 |
7.00E-04 | 10620.38 | 9137.095 | 7897.04 | 7667.322 | 7379.693 | 6874.015 | 5066.226 | 4720.362 | 4299.724 | 3462.206 |
5*5 | 5 | |||||||||
2 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 0 | 3 | |
4 | 2 | 2 | 3 | 4 | 3 | 3 | 4 | 1 | 4 | |
s | 4.672157 | 5.187451 | 4.527059 | 5.522353 | 3.840784 | 4.510588 | 4.838431 | 6.300392 | 5.907451 | 5.504314 |
7.00E-04 | 5417.065 | 5305.925 | 4151.533 | 3726.146 | 3341.035 | 2901.658 | 2698.709 | 2248.754 | 2182.276 | 1893.869 |
5*5 | 10 | |||||||||
3 | 2 | 1 | 0 | 0 | 0 | 1 | 1 | 2 | 0 | |
4 | 4 | 2 | 1 | 3 | 4 | 3 | 4 | 3 | 2 | |
s | 4.309804 | 4.464706 | 3.90902 | 5.866667 | 4.768235 | 5.805098 | 4.849804 | 3.591765 | 4.372941 | 4.789804 |
7.00E-04 | 3928.156 | 3441.593 | 2485.291 | 2468.367 | 2402.884 | 2191.719 | 2158.905 | 2018.171 | 2002.824 | 1859.322 |
5*5 | 20 | |||||||||
3 | 2 | 1 | 0 | 2 | 1 | 0 | 1 | 0 | 0 | |
4 | 3 | 2 | 1 | 4 | 3 | 4 | 4 | 3 | 2 | |
s | 4.205294 | 2.556275 | 3.835294 | 5.88098 | 3.760392 | 3.737451 | 5.752745 | 3.64 | 4.331765 | 4.215098 |
7.00E-04 | 8666.357 | 3551.176 | 2552.704 | 2381.131 | 2304.698 | 2290.206 | 1883.879 | 1748.965 | 1697.317 | 1618.573 |
5*5 | 50 | |||||||||
2 | 3 | 2 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | |
3 | 4 | 4 | 2 | 2 | 4 | 1 | 3 | 4 | 3 | |
s | 2.66549 | 4.046039 | 3.918902 | 4.423843 | 3.249176 | 4.776392 | 5.984078 | 3.413098 | 4.202667 | 3.971922 |
7.00E-04 | 2446.824 | 2241.513 | 2169.352 | 2107.568 | 2044.724 | 1995.075 | 1963.06 | 1956.955 | 1769.859 | 1658.492 |
5*5 | 100 | |||||||||
3 | 2 | 2 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | |
4 | 4 | 3 | 2 | 3 | 1 | 2 | 4 | 3 | 4 | |
s | 4.09349 | 4.037216 | 2.574941 | 4.289882 | 3.589765 | 5.747059 | 3.424941 | 4.635333 | 3.182863 | 3.945451 |
7.00E-04 | 2466.136 | 2307.613 | 2217.095 | 2206.055 | 2194.724 | 2129.392 | 2067.261 | 2064.05 | 1942.764 | 1908.814 |
5*5 | 500 | |||||||||
2 | 2 | 3 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | |
3 | 4 | 4 | 2 | 1 | 3 | 4 | 3 | 2 | 4 | |
s | 1.841937 | 3.871867 | 3.993318 | 3.061655 | 5.784 | 3.767137 | 4.567875 | 2.981114 | 3.974 | 4.114322 |
7.00E-04 | 17644.72 | 3711.824 | 2843.116 | 2595.508 | 2304.387 | 2083.437 | 2054.95 | 1935.94 | 1805.226 | 1698.151 |
5*5 | 1000 | |||||||||
2 | 0 | 2 | 3 | 1 | 0 | 0 | 1 | 0 | 1 | |
3 | 2 | 4 | 4 | 3 | 1 | 4 | 2 | 3 | 4 | |
s | 1.967247 | 3.071443 | 3.734294 | 3.80609 | 2.993365 | 5.5968 | 4.462176 | 3.806086 | 3.764627 | 3.826263 |
7.00E-04 | 17949.56 | 3149.005 | 2865.623 | 2621.101 | 2339.327 | 2076.176 | 2057.337 | 2030.804 | 1831.829 | 1829.357 |
5*5 | 2000 | |||||||||
2 | 0 | 2 | 3 | 1 | 0 | 0 | 1 | 0 | 1 | |
3 | 2 | 4 | 4 | 3 | 1 | 4 | 2 | 3 | 4 | |
s | 1.971653 | 3.133484 | 3.843361 | 3.838414 | 2.892318 | 5.721686 | 4.602229 | 3.848649 | 3.901855 | 3.804335 |
7.00E-04 | 16360.47 | 2862.643 | 2583.503 | 2562.492 | 2388.03 | 2179.472 | 2056.06 | 2028.774 | 1862.261 | 1827.809 |
5*5 | 3000 | |||||||||
2 | 0 | 2 | 3 | 1 | 0 | 0 | 1 | 0 | 1 | |
3 | 2 | 4 | 4 | 3 | 1 | 4 | 2 | 3 | 4 | |
s | 2.028156 | 3.135631 | 3.926705 | 3.783718 | 2.83378 | 5.703769 | 4.601813 | 3.880624 | 3.863376 | 3.778277 |
7.00E-04 | 17897.95 | 2856.523 | 2594.99 | 2536.618 | 2399.015 | 2197.603 | 2087.286 | 2020.784 | 1861.719 | 1833.427 |
当只有1张时迭代次数和移位距离的反比关系很清晰与前述实验数据一致
当有5张图片时
或许是由于图片太少,对称性导致的不规则效应比较明显,n和s的反比关系不是特别突出,但s确实有增函数特征
训练集有100张图片的s曲线
当训练集有500张图片,迭代次数有巨大的数值差异,s曲线增函数特征加强
当训练集有1000张图片的时候,s曲线平滑了很多
训练集有2000张图片
当训练集有3000张图片时的s曲线和训练集有1000张图片时的s曲线相近。n和s有明显的反比特征。