Batch normalization layer (Ioffe and Szegedy, 2014).
Normalize the activations of the previous layer at each batch, i.e. applies a transformation that maintains the mean activation close to 0 and the activation standard deviation close to 1.
layer_batch_normalization( object, axis = -1L, momentum = 0.99, epsilon = 0.001, center = TRUE, scale = TRUE, beta_initializer = "zeros", gamma_initializer = "ones", moving_mean_initializer = "zeros", moving_variance_initializer = "ones", beta_regularizer = NULL, gamma_regularizer = NULL, beta_constraint = NULL, gamma_constraint = NULL, renorm = FALSE, renorm_clipping = NULL, renorm_momentum = 0.99, fused = NULL, virtual_batch_size = NULL, adjustment = NULL, input_shape = NULL, batch_input_shape = NULL, batch_size = NULL, dtype = NULL, name = NULL, trainable = NULL, weights = NULL )
Model or layer object
Integer, the axis that should be normalized (typically the
features axis). For instance, after a
Momentum for the moving mean and the moving variance.
Small float added to variance to avoid dividing by zero.
If TRUE, add offset of
If TRUE, multiply by
Initializer for the beta weight.
Initializer for the gamma weight.
Initializer for the moving mean.
Initializer for the moving variance.
Optional regularizer for the beta weight.
Optional regularizer for the gamma weight.
Optional constraint for the beta weight.
Optional constraint for the gamma weight.
Whether to use Batch Renormalization (https://arxiv.org/abs/1702.03275). This adds extra variables during training. The inference is the same for either value of this parameter.
A named list or dictionary that may map keys
Momentum used to update the moving means and standard deviations with renorm. Unlike momentum, this affects training and should be neither too small (which would add noise) nor too large (which would give stale estimates). Note that momentum is still applied to get the means and variances for inference.
An integer. By default, virtual_batch_size is
A function taking the Tensor containing the (dynamic) shape
of the input tensor and returning a pair
Dimensionality of the input (integer) not including the samples axis. This argument is required when using this layer as the first layer in a model.
Shapes, including the batch size. For instance,
Fixed batch size for layer
The data type expected by the input, as a string (
An optional name string for the layer. Should be unique in a model (do not reuse the same name twice). It will be autogenerated if it isn't provided.
Whether the layer weights will be updated during training.
Initial weights for layer.
Arbitrary. Use the keyword argument
of integers, does not include the samples axis) when using this layer as
the first layer in a model.
Same shape as input.