4用于cifar10的卷积神经网络-4.24Tensorflow中LRN层的工作原理以及添加方法

来源:互联网 发布:openstack的网络架构 编辑:程序博客网 时间:2024/05/29 13:31

LRN(Local Response Normalize Layer) 局部响应归一化层

LRN最早见于Alex的那篇用CNN参加ImageNet比赛的论文,Alex在论文中解释了LRN层模仿了生物神经系统的“侧抑制”机制,对局部神经元的活动创建竞争环境,使得其中响应比较大的值变得相对更大,并抑制其他反馈较小的神经元,增强了模型的泛华能力。Alex在ImageNet数据集上的实验表明,使用LRN后CNN在Top1的错误率将降低1.4%,因此在后来的AlexNet中也加入了LRN层。

这种正则手段的有效性一直不太确定,查阅了很多蚊香似乎也没有详细的解释,由于后来提出的batch normalization手段太过火热,渐渐的就把local response normalization放弃了

《ImageNet classification with deep convolutional neural networks》

http://www.cs.virginia.edu/~vicente/recognition/slides/lecture07/nips2012.pdf

acm=1511834431_1e1c2f81136d0d4a90e65c02b513783e”>http://delivery.acm.org/10.1145/3070000/3065386/p84-krizhevsky.pdf?ip=122.224.227.20&id=3065386&acc=OA&key=4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E5945DC2EABF3343C&CFID=1010824941&CFTOKEN=60661293&acm=1511834431_1e1c2f81136d0d4a90e65c02b513783e

这里写图片描述

以上这种归一手段的公式,其中a的上标指该层的第几个feature map,a的下标x,y表示feature map的像素位置,N指feature map的总数量,公式里的其他参数都是超参,需要自己指定的。
这里写图片描述

 Args:    input: A `Tensor`. Must be one of the following types: `float32`, `half`.      4-D.    depth_radius: An optional `int`. Defaults to `5`.      0-D.  Half-width of the 1-D normalization window.    bias: An optional `float`. Defaults to `1`.      An offset (usually positive to avoid dividing by 0).    alpha: An optional `float`. Defaults to `1`.      A scale factor, usually positive.    beta: An optional `float`. Defaults to `0.5`. An exponent.    name: A name for the operation (optional).第一个参数input:这个输入就是feature map了,既然是feature map,那么它就具有[batch,height,width,channels]这样的shape第二个参数depth_radius:这个值需要自己指定,就是上述公式中的n/2第三个参数bias:公式中的k第四个参数alpha:公式中的α第五个参数beta:公式中的β返回值是新的feature map,它应该具有和原feature map相同的shape

这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

阅读全文
0 0
原创粉丝点击