卷积神经网络涉及到三个基本思想:local receptive fields(局部感受野),shared weights(参数共享),pooling(池化)

https://www.cnblogs.com/yeluzi/p/7521781.html

我们可以将窗口从左到右,从上到下进行平移,每移动一次,当前窗口下的输入神经元就对应一个隐藏层的神经元。

上面我们在隐藏层中只用到了一种核,也就是只检测了一个特征,事实上我们也可以使用多个核来检测多个特征: 

这个例子中就使用了3个5*5的核来检测三个不同的特征。实际中,可能使用更多的特征,比如我们随后的代码中就分别使用了20和40个核。

这个例子中的20幅图分别对应了20个不同的5*5核代表的权重,其中黑色方块代表高权重,白色方块代表低权重,这些图上的黑色区域就是该核所检测的特征。在这些特征图上,我们看到有很多自区域存在很明显的黑白分界,说明这里的确存在一些空间上的特征,至于这些特征是什么,我们并不是特别清楚,毕竟它不是非常规则的几何图形。
卷积的另外一个好处就是减少了需要学习的参数。考虑到最初的神经网络,在使用30个隐藏层神经元的情况下,一共有784*30(权重)+30(偏差)=23550个参数。而现在的话,5*5的核对应26个参数,如果使用20个特征,则有20*26=520个参数,减少了大概40倍。我们有理由相信这将大大减少训练的时间,使得深度网络的训练成为可能。(此处为什么说是26个参数呢?答:因为之前的内容已经说过,所有隐藏层神经元对应的卷积核是共享的,也就是相同的,所以每个隐藏层神经元对应的参数应该是卷积核中元素的25个值再加上一个偏移量b,见公式125,因此参数个数是26),(总参数是20*26=520是因为共有20个不同的卷积核,应该会产生20副图像,所以总参数是520)
(125)式也是“卷积”这个名字的由来,卷积操作就不说了,其实和以前信号系统里学的卷积没什么区别,只是由一维变成了二维情形(图片),并且由连续积分变成了离散求和。

  • 2
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The first CNN appeared in the work of Fukushima in 1980 and was called Neocognitron. The basic architectural ideas behind the CNN (local receptive fields,shared weights, and spatial or temporal subsampling) allow such networks to achieve some degree of shift and deformation invariance and at the same time reduce the number of training parameters. Since 1989, Yann LeCun and co-workers have introduced a series of CNNs with the general name LeNet, which contrary to the Neocognitron use supervised training. In this case, the major advantage is that the whole network is optimized for the given task, making this approach useable for real-world applications. LeNet has been successfully applied to character recognition, generic object recognition, face detection and pose estimation, obstacle avoidance in an autonomous robot etc. myCNN class allows to create, train and test generic convolutional networks (e.g., LeNet) as well as more general networks with features: - any directed acyclic graph can be used for connecting the layers of the network; - the network can have any number of arbitrarily sized input and output layers; - the neuron’s receptive field (RF) can have an arbitrary stride (step of local RF tiling), which means that in the S-layer, RFs can overlap and in the C-layer the stride can differ from 1; - any layer or feature map of the network can be switched from trainable to nontrainable (and vice versa) mode even during the training; - a new layer type: softmax-like M-layer. The archive contains the myCNN class source (with comments) and a simple example of LeNet5 creation and training. All updates and new releases can be found here: http://sites.google.com/site/chumerin/projects/mycnn

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值