View source on GitHub |
Computes the lifted structured loss.
@tf.function
tfa.losses.lifted_struct_loss( labels:
tfa.types.TensorLike
, embeddings:tfa.types.TensorLike
, margin:tfa.types.FloatTensorLike
= 1.0 ) -> tf.Tensor
Returns | |
---|---|
lifted_loss
|
float scalar with dtype of embeddings. |