<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/ops/variables.py#L1987-L1992) |

See [`tf.compat.v1.global_variables_initializer`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/global_variables_initializer). (deprecated)

    tf.compat.v1.initialize_all_variables()

### Used in the notebooks

| Used in the tutorials |
|---|
| - [Linear Mixed-Effect Regression in {TF Probability, R, Stan}](https://www.tensorflow.org/probability/examples/HLM_TFP_R_Stan) |

> [!WARNING]
> **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed after 2017-03-02. Instructions for updating: Use `tf.global_variables_initializer` instead.

> [!NOTE]
> **Note:** The output of this function should be used. If it is not, a warning will be logged or an error may be raised. To mark the output as used, call its .mark_used() method.