MultiLabelSoftMarginLoss — PyTorch 1.10.1 documentation
pytorch.org › docs › stableMultiLabelSoftMarginLoss¶ class torch.nn. MultiLabelSoftMarginLoss (weight = None, size_average = None, reduce = None, reduction = 'mean') [source] ¶ Creates a criterion that optimizes a multi-label one-versus-all loss based on max-entropy, between input x x x and target y y y of size (N, C) (N, C) (N, C). For each sample in the minibatch: