tf.keras.losses.get

TensorFlow 1 version View source on GitHub

Retrieves a Keras loss function.

tf.keras.losses.get(
    identifier
)

Arguments:

  • 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

Returns:

A Keras loss function/ Loss class instance.

Raises:

  • ValueError: If identifier cannot be interpreted.