latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.nn.functional.triplet_margin_with_distance_loss
- tensorplay.nn.functional.triplet_margin_with_distance_loss(anchor: Tensor, positive: Tensor, negative: Tensor, *, distance_function=None, margin: float = 1.0, swap: bool = False, reduction: str = 'mean') Tensor[source]
Compute the triplet margin loss using a custom distance function.
See
TripletMarginWithDistanceLossfor details.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

