torch.nn.functional.multilabel_soft_margin_loss#
- torch.nn.functional.multilabel_soft_margin_loss(input, target, weight=None, size_average=None, reduce=None, reduction='mean')[source]#
Compute the multilabel soft margin loss.
See
MultiLabelSoftMarginLoss
for details.- Parameters
input (Tensor) – Predicted values.
target (Tensor) – Ground truth values.
size_average (bool, optional) – Deprecated (see
reduction
).reduce (bool, optional) – Deprecated (see
reduction
).reduction (str, optional) – Specifies the reduction to apply to the output: ‘none’ | ‘mean’ | ‘sum’. ‘mean’: the mean of the output is taken. ‘sum’: the output will be summed. ‘none’: no reduction will be applied. Default: ‘mean’.
- Returns
Mutilabel soft margin loss.
- Return type