<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/layers/__init__.py#L233-L243) |

Returns the layer configuration as a Python dict.

    tf.keras.layers.serialize(
        layer
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `layer` | A [`keras.layers.Layer`](https://www.tensorflow.org/api_docs/python/tf/keras/Layer) instance to serialize. |

<br />

<br />

<br />

<br />

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

<br />