# tf.compat.v1.is_variable_initialized

<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/variable_v1.py#L35-L47) |

Tests if a variable has been initialized.

    tf.compat.v1.is_variable_initialized(
        variable
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `variable` | A `Variable`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Returns a scalar boolean Tensor, `True` if the variable has been initialized, `False` otherwise. ||

<br />

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