# tf.contrib.eager.get_optimizer_variables

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/eager/python/saver.py#L175-L187) |

Returns a list of variables for the given [`tf.compat.v1.train.Optimizer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/train/Optimizer).

    tf.contrib.eager.get_optimizer_variables(
        optimizer
    )

Equivalent to `optimizer.variables()`.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `optimizer` | An instance of [`tf.compat.v1.train.Optimizer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/train/Optimizer) which has created variables (typically after a call to [`Optimizer.minimize`](https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/Optimizer#minimize)). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A list of variables which have been created by the `Optimizer`. ||

<br />