【记录】为什么在CNN的Batch Norm中对C个channel进行归一化

下面是cs231n-assignment2中的Spatial Batch Norm的介绍中对于此处空间归一化的解释,为什么对shape为NCHW的图像数据进行Batch Norm时需要计算NHW维度的mean和var

If the feature map was produced using convolutions, then we expect every feature channel’s statistics e.g. mean, variance to be relatively consistent both between different images, and different locations within the same image – after all, every feature channel is produced by the same convolutional filter! Therefore spatial batch normalization computes a mean and variance for each of the C feature channels by computing statistics over the minibatch dimension N as well the spatial dimensions H and W.

如果使用卷积生成feature map,那么我们期望每个feature channel的统计数据,例如不同图像之间,以及同一图像中的不同位置之间的均值、方差相对一致 - 毕竟,每个feature channel都是由相同的filter卷积产生的!因此,空间批量归一化通过计算小批量维度N以及空间维度H和W的统计量来计算每个C feature channel的均值和方差。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值