# tensorplay.nn.functional.multilabel_margin_loss

Source: https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.multilabel_margin_loss.html

# tensorplay.nn.functional.multilabel_margin_loss

tensorplay.nn.functional.multilabel_margin_loss(input: TensorBase, target: TensorBase, size_average=None, reduce=None, reduction: [str](https://docs.python.org/3/library/stdtypes.html#str) = 'mean') &#x2192; TensorBase[[source]](../_modules/tensorplay/nn/functional.html#multilabel_margin_loss)

Compute the multilabel margin loss.

Composition of aten/src/ATen/native/LossMultiLabelMargin.cpp: for each
positive label y (targets are active until the first -1), add
max(0, 1 - x[y] + x[d]) over non-target labels d; divide by C.
See MultiLabelMarginLoss for details.
