code: def forward(self, logits, label):
      logits = logits.float()  # use fp32 to avoid nan
      with torch.no_grad():
          num_classes = logits.size(1)
          label = label.clone().detach()
          ignore = label.eq(self.lb_ignore)
          n_valid = ignore.eq(0).sum()
          label[ignore] = 0
          lb_pos, lb_neg = (
              1.0 - self.lb_smooth,
              self.lb_smooth / num_classes,
          )
          lb_one_hot = (
              torch.empty_like(logits)
              .fill_(lb_neg)
              .scatter_(1, label.unsqueeze(1), lb_pos)
              .detach()
          )
  
      logs = self.log_softmax(logits)
      loss = -torch.sum(logs * lb_one_hot, dim=1)
      loss[ignore] = 0
      if self.reduction == "mean":
          loss = loss.sum() / n_valid
      if self.reduction == "sum":
          loss = loss.sum()
  
      return loss
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.autograd import Variable
label_desc: Use image node_id 2 for calling the LabelSmoothSoftmaxCEV1 obj's underlying member method code with example usage: obj.forward(logits, label) and returns: loss