class_docstr: SoftCrossEntropyLoss (useful for label smoothing and mixup).
  Identical to torch.nn.CrossEntropyLoss if used with one-hot labels.
class_docstr_tok: ["SoftCrossEntropyLoss","(","useful","for","label","smoothing","and","mixup",")",".","Identical","to","torch.nn.CrossEntropyLoss","if","used","with","one-hot","labels","."]
code: def forward(self, x, y):
      loss = -y * torch.nn.functional.log_softmax(x, -1)
      return torch.sum(loss) / x.shape[0]
  
file_path: pycls/pycls/core/net.py
imports: import itertools
  import numpy
  import pycls.core.distributed
  import torch
  from pycls.core.config import cfg
label_desc: Use image node_id 2 for calling the SoftCrossEntropyLoss obj's underlying member method code with example usage: obj.forward(x, y) and returns: unknown