# tf.keras.backend.batch_normalization

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/backend/batch_normalization) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/keras/backend.py#L2614-L2670) |

Applies batch normalization on x given mean, var, beta and gamma.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.backend.batch_normalization`](https://www.tensorflow.org/api_docs/python/tf/keras/backend/batch_normalization)

<br />

    tf.keras.backend.batch_normalization(
        x, mean, var, beta, gamma, axis=-1, epsilon=0.001
    )

I.e. returns:
`output = (x - mean) / (sqrt(var) + epsilon) * gamma + beta`

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `x` | Input tensor or variable. |
| `mean` | Mean of batch. |
| `var` | Variance of batch. |
| `beta` | Tensor with which to center the input. |
| `gamma` | Tensor by which to scale the input. |
| `axis` | Integer, the axis that should be normalized. (typically the features axis). |
| `epsilon` | Fuzz factor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor. ||

<br />