deeplearning-cv-notes
deeplearning-cv-notes copied to clipboard
为什么 CNN's conv bias 设为 False,如 ResNet、SEnet等
参考:https://github.com/kuangliu/pytorch-cifar/issues/52
Any channel bias added would only affect the channel mean. Since BatchNorm2d is applied after Conv2d and will remove the channel mean, there's no point of adding bias to Conv2d. To put it in another way, the gradient w.r.t. the conv bias will be zero anyway.
添加的任何通道偏置只会影响通道平均值。 由于BatchNorm2d在Conv2d之后应用,并且将删除通道均值,因此没有必要向Conv2d添加偏差。 换句话说,梯度w.r.t. 无论如何,转化偏倚将为零。