tf.nn.batch_normalization

View source on GitHub

Batch normalization.

tf.nn.batch_normalization(
    x, mean, variance, offset, scale, variance_epsilon, name=None
)

Normalizes a tensor by mean and variance, and applies (optionally) a scale \(\gamma\) to it, as well as an offset \(\beta\):

\(\frac{\gamma(x-\mu)}{\sigma}+\beta\)

mean, variance, offset and scale are all expected to be of one of two shapes:

See equation 11 in Algorithm 2 of source: Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift; S. Ioffe, C. Szegedy.

Args:

Returns:

Normalized, scaled, offset tensor.