TensorPlay
latest (dev)
Copy
View Markdown

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 TripletMarginWithDistanceLoss for details.

On this page

Ask DeepWiki