# tf.compat.v1.initialize_all_variables

<br />

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

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

    tf.compat.v1.initialize_all_variables()

> [!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.