( A, B )---3-30-2---( 1, 0 )( 0, 1 )
让网络的输入只有3个节点,A有5个点,B全是0,排列组合。让A,B训练集分别有3,4,5,6张图片,统计迭代次数并排序。
先比较图片数量是3和4的情况
n=4 | 迭代次数 | n=3 | 迭代次数 | 4/3 | ||||||
3 | 1 | 1 | 1 | 3548.859 | 1 | 1 | 1 | 2471.4623 | 1.43594 | |
1 | - | - | 3548.859 | 1 | - | - | 2471.4623 | 1.43594 | ||
- | 1 | - | 3548.859 | - | - | 1 | 2471.4623 | 1.43594 | ||
- | - | - | 3548.859 | 2471.4623 | 1.43594 | |||||
3548.859 | 2471.4623 | 1.43594 | ||||||||
3548.859 | 2471.4623 | 1.43594 | ||||||||
3548.859 | 2471.4623 | 1.43594 | ||||||||
4 | 1 | - | 1 | 6283.342 | - | - | 1 | 4619.593 | 1.36015 | |
- | 1 | - | 6283.342 | 1 | - | 1 | 4619.593 | 1.36015 | ||
- | - | - | 6283.342 | 1 | 1 | - | 4619.593 | 1.36015 | ||
1 | 1 | - | 6283.342 | 4619.593 | 1.36015 | |||||
6283.342 | 4619.593 | 1.36015 | ||||||||
6283.342 | 4619.593 | 1.36015 | ||||||||
6283.342 | 4619.593 | 1.36015 | ||||||||
8 | - | - | - | 8962.236 | 1 | 1 | 1 | 8252.206 | 1.08604 | |
1 | 1 | 1 | 8962.236 | 1 | - | - | 8252.206 | 1.08604 | ||
- | 1 | - | 8962.236 | 1 | - | - | 8252.206 | 1.08604 | ||
- | 1 | - | 8962.236 | 8252.206 | 1.08604 | |||||
8962.236 | 8252.206 | 1.08604 | ||||||||
8962.236 | 8252.206 | 1.08604 | ||||||||
8962.236 | 8252.206 | 1.08604 | ||||||||
12 | 1 | - | 1 | 10698.21 | - | 1 | 1 | 9868.3769 | 1.08409 | |
1 | - | 1 | 10698.21 | - | 1 | 1 | 9868.3769 | 1.08409 | ||
- | - | 1 | 10698.21 | - | - | 1 | 9868.3769 | 1.08409 | ||
- | - | - | 10698.21 | 9868.3769 | 1.08409 | |||||
10698.21 | 9868.3769 | 1.08409 | ||||||||
10698.21 | 9868.3769 | 1.08409 | ||||||||
10698.21 | 9868.3769 | 1.08409 | ||||||||
14 | 1 | - | 1 | 14888.9 | 1 | - | 1 | 14103.302 | 1.0557 | |
- | 1 | 1 | 14888.9 | - | 1 | 1 | 14103.302 | 1.0557 | ||
- | - | 1 | 14888.9 | - | - | 1 | 14103.302 | 1.0557 | ||
- | - | - | 14888.9 | 14103.302 | 1.0557 | |||||
14888.9 | 14103.302 | 1.0557 | ||||||||
14888.9 | 14103.302 | 1.0557 | ||||||||
14888.9 | 14103.302 | 1.0557 | ||||||||
15 | - | - | - | 15858.36 | 1 | - | 1 | 18149.704 | 0.87375 | |
- | 1 | 1 | 15858.36 | 1 | - | 1 | 18149.704 | 0.87375 | ||
1 | - | - | 15858.36 | - | 1 | - | 18149.704 | 0.87375 | ||
- | 1 | 1 | 15858.36 | 18149.704 | 0.87375 | |||||
15858.36 | 18149.704 | 0.87375 | ||||||||
15858.36 | 18149.704 | 0.87375 | ||||||||
15858.36 | 18149.704 | 0.87375 |
收敛误差为7e-4,收敛199次,取迭代次数平均值
5个点差值结构一共只有34个,其中高度h=3且只有3列的只有6个,当训练集图片数量是n=3的时候,点的数量d=5,所以有
d>h=n:结构间比值与迭代次数成反比
4/3的比值反比关系很清晰。
比较第二种情况图片数量是4和5
n=5 | 迭代次数 | n=4 | 迭代次数 | 5/4 | ||||||
1 | 0 | 1 | 1 | 3683.965 | - | 1 | 1 | 2811.3317 | 1.3104 | |
0 | 1 | 0 | 3683.965 | - | - | 1 | 2811.3317 | 1.3104 | ||
0 | 1 | 0 | 3683.965 | - | - | 1 | 2811.3317 | 1.3104 | ||
0 | 0 | 1 | 3683.965 | - | 1 | - | 2811.3317 | 1.3104 | ||
0 | 0 | 0 | 3683.965 | 2811.3317 | 1.3104 | |||||
3683.965 | 2811.3317 | 1.3104 | ||||||||
3683.965 | 2811.3317 | 1.3104 | ||||||||
2 | 1 | 0 | 1 | 3932.508 | - | 1 | 1 | 2950.99 | 1.33261 | |
1 | 0 | 0 | 3932.508 | - | - | 1 | 2950.99 | 1.33261 | ||
0 | 1 | 0 | 3932.508 | - | 1 | - | 2950.99 | 1.33261 | ||
0 | 0 | 1 | 3932.508 | 1 | - | - | 2950.99 | 1.33261 | ||
0 | 0 | 0 | 3932.508 | 2950.99 | 1.33261 | |||||
3932.508 | 2950.99 | 1.33261 | ||||||||
3932.508 | 2950.99 | 1.33261 | ||||||||
7 | 1 | 1 | 0 | 9825.925 | - | - | 1 | 9780.4774 | 1.00465 | |
0 | 0 | 1 | 9825.925 | - | - | 1 | 9780.4774 | 1.00465 | ||
1 | 0 | 0 | 9825.925 | - | 1 | 1 | 9780.4774 | 1.00465 | ||
1 | 0 | 0 | 9825.925 | 1 | - | - | 9780.4774 | 1.00465 | ||
0 | 0 | 0 | 9825.925 | 9780.4774 | 1.00465 | |||||
9825.925 | 9780.4774 | 1.00465 | ||||||||
9825.925 | 9780.4774 | 1.00465 | ||||||||
9 | 1 | 1 | 0 | 11767.83 | 1 | - | - | 11215.693 | 1.04923 | |
0 | 0 | 1 | 11767.83 | - | 1 | - | 11215.693 | 1.04923 | ||
0 | 0 | 1 | 11767.83 | 1 | - | 1 | 11215.693 | 1.04923 | ||
0 | 1 | 0 | 11767.83 | - | 1 | - | 11215.693 | 1.04923 | ||
0 | 0 | 0 | 11767.83 | 11215.693 | 1.04923 | |||||
11767.83 | 11215.693 | 1.04923 | ||||||||
11767.83 | 11215.693 | 1.04923 | ||||||||
10 | 0 | 1 | 1 | 12409.84 | 1 | - | - | 12968.849 | 0.9569 | |
0 | 0 | 1 | 12409.84 | 1 | - | - | 12968.849 | 0.9569 | ||
0 | 0 | 1 | 12409.84 | 1 | - | - | 12968.849 | 0.9569 | ||
0 | 0 | 1 | 12409.84 | 1 | 1 | - | 12968.849 | 0.9569 | ||
0 | 0 | 0 | 12409.84 | 12968.849 | 0.9569 | |||||
12409.84 | 12968.849 | 0.9569 | ||||||||
12409.84 | 12968.849 | 0.9569 | ||||||||
17 | 0 | 0 | 1 | 22773.47 | 1 | - | 1 | 28049.553 | 0.8119 | |
1 | 1 | 0 | 22773.47 | - | 1 | - | 28049.553 | 0.8119 | ||
0 | 0 | 1 | 22773.47 | - | 1 | - | 28049.553 | 0.8119 | ||
0 | 0 | 1 | 22773.47 | - | 1 | - | 28049.553 | 0.8119 | ||
0 | 0 | 0 | 22773.47 | 28049.553 | 0.8119 | |||||
22773.47 | 28049.553 | 0.8119 | ||||||||
22773.47 | 28049.553 | 0.8119 |
高度h=4只有3列的5点差值结构也只有6个,对于n=4的情况,同样满足
d>h=n
5/4的比值也大体上是反比的。
比较h=5的情况
n=6 | 迭代次数 | n=5 | 迭代次数 | 6/5 | ||||||
19 | - | 1 | - | 17775.5 | 0 | 0 | 1 | 23659.18 | 0.751 | |
- | 1 | - | 17775.5 | 0 | 1 | 0 | 23659.18 | 0.751 | ||
- | - | - | 17775.5 | 0 | 1 | 0 | 23659.18 | 0.751 | ||
- | 1 | - | 17775.5 | 0 | 1 | 0 | 23659.18 | 0.751 | ||
- | - | 1 | 17775.5 | 0 | 1 | 0 | 23659.18 | 0.751 | ||
- | 1 | - | 17775.5 | 23659.18 | 0.751 | |||||
17775.5 | 23659.18 | 0.751 | ||||||||
20 | - | 1 | - | 18241.75 | 0 | 0 | 1 | 24182.31 | 0.754 | |
- | 1 | - | 18241.75 | 0 | 0 | 1 | 24182.31 | 0.754 | ||
- | - | - | 18241.75 | 0 | 0 | 1 | 24182.31 | 0.754 | ||
- | 1 | - | 18241.75 | 0 | 1 | 0 | 24182.31 | 0.754 | ||
1 | - | - | 18241.75 | 1 | 0 | 0 | 24182.31 | 0.754 | ||
- | - | 1 | 18241.75 | 24182.31 | 0.754 | |||||
18241.75 | 24182.31 | 0.754 | ||||||||
25 | - | - | - | 20650.54 | 1 | 0 | 0 | 27183.99 | 0.76 | |
- | 1 | - | 20650.54 | 1 | 0 | 0 | 27183.99 | 0.76 | ||
- | 1 | - | 20650.54 | 1 | 0 | 0 | 27183.99 | 0.76 | ||
- | 1 | - | 20650.54 | 1 | 0 | 0 | 27183.99 | 0.76 | ||
- | 1 | - | 20650.54 | 1 | 0 | 0 | 27183.99 | 0.76 | ||
- | 1 | - | 20650.54 | 27183.99 | 0.76 | |||||
20650.54 | 27183.99 | 0.76 | ||||||||
27 | - | - | - | 22292.67 | 1 | 0 | 0 | 29172.19 | 0.764 | |
- | - | 1 | 22292.67 | 1 | 0 | 0 | 29172.19 | 0.764 | ||
1 | - | - | 22292.67 | 1 | 0 | 0 | 29172.19 | 0.764 | ||
1 | - | - | 22292.67 | 0 | 1 | 0 | 29172.19 | 0.764 | ||
- | - | 1 | 22292.67 | 0 | 1 | 0 | 29172.19 | 0.764 | ||
- | - | 1 | 22292.67 | 29172.19 | 0.764 | |||||
22292.67 | 29172.19 | 0.764 | ||||||||
31 | 1 | - | - | 26115.23 | 1 | 0 | 0 | 33687.66 | 0.775 | |
- | 1 | - | 26115.23 | 0 | 1 | 0 | 33687.66 | 0.775 | ||
- | - | 1 | 26115.23 | 0 | 0 | 1 | 33687.66 | 0.775 | ||
- | 1 | - | 26115.23 | 0 | 1 | 0 | 33687.66 | 0.775 | ||
1 | - | - | 26115.23 | 0 | 0 | 1 | 33687.66 | 0.775 | ||
- | - | - | 26115.23 | 33687.66 | 0.775 | |||||
26115.23 | 33687.66 | 0.775 |
高度h=5,3列的5点差值结构只有5个,对于n=5的情况满足
d=h=n:结构间比值与迭代次数成正比
比较6/5的比值
正比关系很清晰,
对于二值化二分类网络,当B全为0时,
d>h=n:结构间比值与迭代次数成反比
d=h=n:结构间比值与迭代次数成正比
d点的数量,h结构高度,n训练集图片数量
这次实验验证了这一关系。