評價此頁

torch.nn.functional.multilabel_margin_loss#

torch.nn.functional.multilabel_margin_loss(input, target, size_average=None, reduce=None, reduction='mean')[source]#

計算多標籤邊距損失。

有關詳細資訊,請參閱 MultiLabelMarginLoss

引數
  • input (Tensor) – 預測值。

  • target (Tensor) – 真值。

  • size_average (bool, optional) – 已棄用(請參閱 reduction)。

  • reduce (bool, optional) – 已棄用(請參閱 reduction)。

  • reduction (str, optional) – 指定應用於輸出的約簡:‘none’ | ‘mean’ | ‘sum’。‘mean’:取輸出的平均值。‘sum’:將輸出相加。‘none’:不應用任何約簡。預設為 ‘mean’。

返回

多標籤邊距損失。

返回型別

張量