tf.keras.losses.get

Retrieves a Keras loss function.

Main aliases

tf.losses.get

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.keras.losses.get

identifier A loss identifier. One of None or string name of a loss function/class or loss configuration dictionary or a loss function or a loss class instance

A Keras loss function/ Loss class instance.

ValueError If identifier cannot be interpreted.