pytorch / 2 / generated / torch.nn.functional.triplet_margin_loss.html

torch.nn.functional.triplet_margin_loss

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

See TripletMarginLoss for details

Return type

Tensor

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.nn.functional.triplet_margin_loss.html