# tf.keras.utils.get_custom_objects

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.7.0/keras/utils/generic_utils.py#L92-L110) |

Retrieves a live reference to the global dictionary of custom objects.

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.keras.utils.get_custom_objects`](https://www.tensorflow.org/api_docs/python/tf/keras/saving/get_custom_objects)

<br />

    tf.keras.utils.get_custom_objects()

Updating and clearing custom objects using `custom_object_scope`
is preferred, but `get_custom_objects` can
be used to directly access the current collection of custom objects.

#### Example:

    get_custom_objects().clear()
    get_custom_objects()['MyObject'] = MyObject

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Global dictionary of names to classes (`_GLOBAL_CUSTOM_OBJECTS`). ||

<br />