在看mask rcnn的代码中,我看到了网络结构中有个重写batch normalization的类:
class BatchNorm(KL.BatchNormalization):
"""Extends the Keras BatchNormalization class to allow a central place
to make changes if needed.
Batch normalization has a negative effect on training if batches are small
so this layer is often frozen (via setting in Config class) and functions
as linear layer.
"""
由于做dense prediction图片通常比较大。所以一个batch一般都只有1-2张图片,
所以,不建议使用 BN。