slim.batch_norm()函数中各参数的意义

slim.batch_norm()函数,以及slim的各个层函数的normalizer_fn=slim.batch_norm调用都会用到,其参数很多,需要以字典的形式传入。slim.batch_norm是BN算法函数,在网络训练的时候加入BN能加快训练速度,同时能增强模型的泛化能力。

1. inputs

A tensor with 2 or more dimensions, where the first dimension has batch_size. The normalization is over all but the last dimension if data_format is NHWC and the second dimension if data_format is NCHW.

2. decay

Decay for the moving average. Reasonable values for decay are close Decay for the moving average. Reasonable values for decay are close to 1.0, typically in the multiple-nines range: 0.999, 0.99, 0.9, etc. Lower decay value (recommend trying decay=0.9) if model experiences reasonably good training performance but poor validation and/or test performance. Try zero_debias_moving_mean=True for improved stability.

3. center

If True, add offset of beta to normalized tensor. If False, beta is ignored.

4. scale

If True, multiply by gamma. If False, gamma is not used. When the next layer is linear (also e.g. nn.relu), this can be disabled since the scaling can be done by the next layer.

5. epsilon

Small float added to variance to avoid dividing by zero. activation_fn: Activation function, default set to None to skip it and maintain a linear activation.

你可能感兴趣的:(slim.batch_norm()函数中各参数的意义)