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')[源代码]¶
计算给定输入张量之间的三重损失,并使用大于0的边际值。
详情请参见
TripletMarginLoss。- Return type