code: def forward(self, pred, target):
      pred = pred.log_softmax(dim=self.dim)
      num_classes = pred.size(self.dim)
      with torch.no_grad():
          true_dist = torch.zeros_like(pred)
          true_dist.fill_(self.smoothing / (num_classes - 1))
          true_dist.scatter_(
              1, target.data.unsqueeze(1), self.confidence
          )
      return torch.mean(torch.sum(-true_dist * pred, dim=self.dim))
  
file_path: nni/examples/nas/legacy/oneshot/proxylessnas/putils.py
imports: import torch
  import nni.retiarii.nn.pytorch
label_desc: Use image node_id 2 for calling the LabelSmoothingLoss obj's underlying member method code with example usage: obj.forward(pred, target) and returns: torch