niftynet.layer.bn module

class niftynet.layer.bn.BNLayer(regularizer=None, moving_decay=0.9, eps=1e-05, name='batch_norm')

Bases: niftynet.layer.base_layer.TrainableLayer

Batch normalisation layer, with trainable mean value ‘beta’ and std ‘gamma’. ‘beta’ is initialised to 0.0 and ‘gamma’ is initialised to 1.0. This class assumes ‘beta’ and ‘gamma’ share the same type_str of regulariser.

layer_op(inputs, is_training, use_local_stats=False)