MultiLabelSoftMarginLoss — PyTorch 1.10.1 documentation
pytorch.org › docs › stableMultiLabelSoftMarginLoss — PyTorch 1.10.0 documentation MultiLabelSoftMarginLoss 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 and target y y of size (N, C) (N,C) .
MultiLabelMarginLoss — PyTorch 1.10.1 documentation
pytorch.org › docs › stableMultiLabelMarginLoss — PyTorch 1.10.1 documentation MultiLabelMarginLoss class torch.nn.MultiLabelMarginLoss(size_average=None, reduce=None, reduction='mean') [source] Creates a criterion that optimizes a multi-class multi-classification hinge loss (margin-based loss) between input x x (a 2D mini-batch Tensor ) and output