tf.keras.losses.deserialize

Deserializes a serialized loss class/function instance.

name Loss configuration.
custom_objects Optional dictionary mapping names (strings) to custom objects (classes and functions) to be considered during deserialization.
use_legacy_format Boolean, whether to use the legacy serialization format. Defaults to False.

A Keras Loss instance or a loss function.