<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/metrics/__init__.py#L147-L164) |

Deserializes a serialized metric class/function instance.

    tf.keras.metrics.deserialize(
        config, custom_objects=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `config` | Metric configuration. |
| `custom_objects` | Optional dictionary mapping names (strings) to custom objects (classes and functions) to be considered during deserialization. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A Keras `Metric` instance or a metric function. ||

<br />