捷徑

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')[原始碼][原始碼]

使用自定義距離函數計算輸入張量的 triplet margin loss。

詳情請參閱 TripletMarginWithDistanceLoss

回傳類型

Tensor

文件

取得 PyTorch 的完整開發者文件

檢視文件

教學課程

取得初學者和進階開發人員的深入教學課程

檢視教學課程

資源

尋找開發資源並獲得問題解答

檢視資源