TensorPlay
API symbolsnn
Copy
View MarkdownDownload .md

tensorplay.nn.functional.triplet_margin_loss

tensorplay.nn.functional.triplet_margin_loss(anchor: TensorBase, positive: TensorBase, negative: TensorBase, margin: float = 1.0, p: float = 2, eps: float = 1e-06, swap: bool = False, size_average=None, reduce=None, reduction: str = 'mean') TensorBase[source]

Compute the triplet loss between given input tensors and a margin greater than 0.

See TripletMarginLoss for details.

Ask DeepWiki