# tf.keras.saving.serialize_keras_object

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.13.1/keras/saving/serialization_lib.py#L128-L280) |

Retrieve the config dict by serializing the Keras object.

#### View aliases


**Main aliases**

[`tf.keras.utils.serialize_keras_object`](https://www.tensorflow.org/api_docs/python/tf/keras/saving/serialize_keras_object)
**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

\`tf.compat.v1.keras.saving.serialize_keras_object\`, \`tf.compat.v1.keras.utils.serialize_keras_object\`

<br />

    tf.keras.saving.serialize_keras_object(
        obj
    )

`serialize_keras_object()` serializes a Keras object to a python dictionary
that represents the object, and is a reciprocal function of
`deserialize_keras_object()`. See `deserialize_keras_object()` for more
information about the config format.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `obj` | the Keras object to serialize. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A python dict that represents the object. The python dict can be deserialized via `deserialize_keras_object()`. ||

<br />