<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/optimizers/__init__.py#L43-L53) |

Returns the optimizer configuration as a Python dict.

    tf.keras.optimizers.serialize(
        optimizer
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `optimizer` | An `Optimizer` instance to serialize. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Python dict which contains the configuration of the optimizer. ||

<br />