[tensorflow] conv, batchnorm, dropout, activation 的使用顺序

参考 :https://stackoverflow.com/questions/39691902/ordering-of-batch-normalization-and-dropout

一般来说使用顺序是:

-> CONV/FC -> ReLu(or other activation) -> Dropout -> BatchNorm -> CONV/FC ->

但是:

Usually, Just drop the Dropout(when you have BN):

  • "BN eliminates the need for Dropout in some cases cause BN provides similar regularization benefits as Dropout intuitively"
  • "Architectures like ResNet, DenseNet, etc. not using Dropout

For more details, refer to this paper [Understanding the Disharmony between Dropout and Batch Normalization by Variance Shift] as already mentioned by @Haramoz in the comments.

所以更推荐的做法是:

-> CONV/FC -> ReLu(or other activation) ->  BatchNorm -> CONV/FC ->

 

总结:

  1. 先dropout后BN/LN(特别是residual net,必须先drop才能对残差和进行norm)
  2. activation一般在drop和norm之前

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值