class_docstr: This combines the Softmax Cross-Entropy Loss (nn.CrossEntropyLoss) and the large-margin inducing
  regularization proposed in
     T. Kobayashi, "Large-Margin In Softmax Cross-Entropy Loss." In BMVC2019.
  
  This loss function inherits the parameters from nn.CrossEntropyLoss except for `reg_lambda` and `deg_logit`.
  Args:
       reg_lambda (float, optional): a regularization parameter. (default: 0.3)
       deg_logit (bool, optional): underestimate (degrade) the target logit by -1 or not. (default: False)
                                   If True, it realizes the method that incorporates the modified loss into ours
                                   as described in the above paper (Table 4).
code: def __init__(
      self,
      reg_lambda=0.3,
      deg_logit=None,
      weight=None,
      size_average=None,
      ignore_index=-100,
      reduce=None,
      reduction="mean",
  ):
      super(LargeMarginInSoftmaxLoss, self).__init__(
          weight=weight,
          size_average=size_average,
          ignore_index=ignore_index,
          reduce=reduce,
          reduction=reduction,
      )
      self.reg_lambda = reg_lambda
      self.deg_logit = deg_logit
  
file_path: stanza/stanza/models/common/large_margin_loss.py
imports: import math
  import torch
  import torch.nn
  import torch.nn.init
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new LargeMarginInSoftmaxLoss object from inherited base classes: nn with example: obj = LargeMarginInSoftmaxLoss(reg_lambda, deg_logit, weight, size_average, ignore_index, reduce, reduction)