TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.nn.functional.triplet_margin_loss

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

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

See TripletMarginLoss for details.

On this page

Ask DeepWiki