快捷方式

torch.nn.functional.triplet_margin_with_distance_loss

torch.nn.functional.triplet_margin_with_distance_loss(anchor, positive, negative, *, distance_function=None, margin=1.0, swap=False, reduction='mean')[source][source]

使用自定義距離函式計算輸入張量的三元組邊界損失。

詳情請參閱 TripletMarginWithDistanceLoss

返回型別

Tensor

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源