mindspore.ops.SoftMarginLoss

class mindspore.ops.SoftMarginLoss(reduction='mean')[source]
prim = ops.SoftMarginLoss(reduction)
out = prim(input, target)

is equivalent to

ops.soft_margin_loss(input, target, reduction)

Refer to mindspore.ops.soft_margin_loss() for more details.