class_docstr: Initialize the Lightseq Cross Entropy Layer.
  
  Static variable:
      layer_id: The layer-index counter starting from 0 and incrementing by 1 every time a layer object is instantiated,
  Arguments:
      config: An object of LSCrossEntropyLayer config, see get_config
code: def forward(self, inputs, targets, **kwargs):
      self.config.training = self.training
      self.config.is_grad_enabled = torch.is_grad_enabled()
      bs, sl = inputs.size()[:2]
      if bs * sl > self.config.max_batch_tokens:
          raise ValueError(
              f"Batch token numbers {bs * sl} exceeds the limit {self.config.max_batch_tokens}."
          )
      loss, nll_loss = LSCrossEntropyFunc.apply(
          self.config, inputs, targets, **kwargs
      )
      return loss, nll_loss
  
file_path: lightseq/lightseq/training/ops/pytorch/cross_entropy_layer.py
imports: from dataclasses import dataclass
  import torch
  from torch import nn
  from torch.autograd import Function
  from lightseq.training.ops.pytorch.builder import TransformerBuilder
label_desc: Use image node_id 3 for calling the LSCrossEntropyLayer obj's underlying member method code with example usage: obj.forward(inputs, targets) and returns: loss,  nll_loss