latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.nn.functional.multi_margin_loss
- tensorplay.nn.functional.multi_margin_loss(input: Tensor, target: Tensor, p: int = 1, margin: float = 1.0, weight: Tensor | None = None, size_average=None, reduce=None, reduction: str = 'mean') Tensor[source]
Compute the multi margin loss, with optional weighting.
sum_d max(0, margin - x_y + x_d)^p * w_y / Cover non-target classes. SeeMultiMarginLossfor details.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

