您的位置:首页 > 理论基础 > 计算机网络

卷积神经网络简介(A introduction to convolutional neural networks )

2013-10-07 14:48 176 查看
最近一直在看卷积神经网络(CNN),把我对CNN的理解记录如下(主要是在computer vision 领域)。

本质上, 卷积神经网络是一种特殊的神经网络(NN)。CNN 与 NN 最大的不同在于结构的不同。

对于NN来说,层与层之间的神经元是完全连结的(fully connected), 这样会导致可调节参数过多,学习这些参数非常困难,容易出现过拟合的问题。另外一个问题这种完全连结的结构缺乏内在的变换不变性(built in invariance with respect to translation or local distortions of the input)。

而CNN层与层之间则是部分相连的,而且参数对于输入的不同部分是一样的。(CNN force the extraction of local features by restricting the receptive fields of hidden units to be local).CNN 主要结合了三个结构特点来保证一定程度的 shift,scale,and distortion invariance 。

1)local receptive fields

2)shared weights

3)spatial or temporal sub-sampling

下面通过介绍一个实际的CNN(LeNet-5)来说明以上几点。



LeNet-5一共有7层,不包括input层。input 是 32*32 的 图像。

1)C1是有6个feature maps的卷积层,每个feature map里的每个单元连结了一个5*5的input 区域。 C1的大小是 28*28,因为上下左右都需要去掉2。 C1一共有156个可训练参数和122304个连结。 156 = (5*5+1)*6. 122304 = (28*28)*26*6

2)S2是一个下取样层(sub-sampling layer),有 6个 14 *14 的 feature maps。分别为C1 以 2*2取样得来。

3)C3有16个feature maps,每个大小10*10. 16个feature maps 分别连结不同的S2 feature maps,如下图 。一共有1516个可训练参数 和 151600个连结。1516 = 6*(25*3+1) + 9*(25*4+1) + 25*6+1 = 1516. 151600 = 1516*10*10



4)S4 有 16个 5*5 feature maps

5) C5 有120个 feature maps。每一个unit都连结到 5*5 neighborhood on all 16 of S4 feature maps。 C5 有 48120个 可训练参数 。 48120 = (5*5*16+1)*120

6)F6有84个units 。跟C5是fully connected。 可训练参数有 10164 =120 *84+84.

7)最后一层 is composed of Euclidean Radial Basis Function units(RBF), one for each class,with 84 input each. 最后的output 层有10个输出 , 每一个代表识别的数字,从 0-9.

LeNet-5被训练来识别手写数字。训练数据样例如下



识别结果



参考资料

Yann LeCun,et.al, Gradient-Based Learning Applied to Document Recognition

转载请注明 : /article/9999238.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: