Attend the Women in ML Symposium on December 7 Register now

tfr.keras.losses.get

Stay organized with collections Save and categorize content based on your preferences.

Factory method to get a ranking loss class.

loss (str) An attribute of RankingLossKey, defining which loss object to return.
reduction (enum) An enum of strings indicating the loss reduction type. See type definition in the tf.compat.v2.losses.Reduction.
lambda_weight (losses_impl._LambdaWeight) A lambda object for ranking metric optimization.
name (optional) (str) Name of loss.
**kwargs Keyword arguments for the loss object.

A ranking loss instance. See _RankingLoss signature for more details.

ValueError If loss_key is unsupported.