Module: tfa.losses.triplet

View source on GitHub

Implements triplet loss.

Classes

class TripletHardLoss: Computes the triplet loss with hard negative and hard positive mining.

class TripletSemiHardLoss: Computes the triplet loss with semi-hard negative mining.

Functions

triplet_hard_loss(...): Computes the triplet loss with hard negative and hard positive mining.

triplet_semihard_loss(...): Computes the triplet loss with semi-hard negative mining.

Type Aliases

FloatTensorLike

TensorLike