latest (dev)
Copy
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
TripletMarginLossfor details.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

