评价此页

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”。

返回

多标签边距损失。

返回类型

张量