評價此頁

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 的 margin 之間的三元組損失。

有關詳細資訊,請參閱 TripletMarginLoss

返回型別

張量