class_docstr:    The cross-entropy with ``mask`` support.
     Technically, it is a wrapper of ``nn.NLLLoss``.
  
  Parameters
  ----------
  vocab: Vocab
     The vocab for loss calculation.
code: def __init__(self, vocab: Vocab):
      super(CrossEntropyLoss, self).__init__()
      self.loss_func = nn.NLLLoss()
      self.VERY_SMALL_NUMBER = 1e-31
      self.vocab = vocab
  
imports: import torch
  import torch.nn
  from graph4nlp.pytorch.modules.utils.vocab_utils import Vocab
  from .base import GeneralLossBase
label_desc: Use image node_id 1 to create a new CrossEntropyLoss object from inherited base classes: GeneralLossBase with example: obj = CrossEntropyLoss(vocab)