docstr: A whole framework to process the original logits over the vocabulary, which contains four steps:
  
  (1) Project the logits into logits of label words
  
  if self.post_log_softmax is True:
  
      (2) Normalize over all label words
  
      (3) Calibrate (optional)
  
  (4) Aggregate (for multiple label words)
  
  Args:
      logits (:obj:`paddle.Tensor`): The original logits.
  
  Returns:
      (:obj:`paddle.Tensor`): The final processed logits over the labels (classes).
docstr_tok: ["A","whole","framework","to","process","the","original","logits","over","the","vocabulary",",","which","contains","four","steps",":","(","1",")","Project","the","logits","into","logits","of","label","words","if","self.post_log_softmax","is","True",":","(","2",")","Normalize","over","all","label","words","(","3",")","Calibrate","(","optional",")","(","4",")","Aggregate","(","for","multiple","label","words",")","Args",":","logits","(",":","obj",":","`","paddle.Tensor","`",")",":","The","original","logits",".","Returns",":","(",":","obj",":","`","paddle.Tensor","`",")",":","The","final","processed","logits","over","the","labels","(","classes",")","."]
code: def process_logits(self, logits, **kwargs):
      r"""A whole framework to process the original logits over the vocabulary, which contains four steps:
  
      (1) Project the logits into logits of label words
  
      if self.post_log_softmax is True:
  
          (2) Normalize over all label words
  
          (3) Calibrate (optional)
  
      (4) Aggregate (for multiple label words)
  
      Args:
          logits (:obj:`paddle.Tensor`): The original logits.
  
      Returns:
          (:obj:`paddle.Tensor`): The final processed logits over the labels (classes).
      """
      # project
      label_words_logits = self.project(
          logits, **kwargs
      )  # Output: (batch_size, num_classes) or  (batch_size, num_classes, num_label_words_per_label)
  
      if self.post_log_softmax:
          # normalize
          label_words_probs = self.normalize(label_words_logits)
  
          # calibrate
          if (
              hasattr(self, "_calibrate_logits")
              and self._calibrate_logits is not None
          ):
              label_words_probs = self.calibrate(
                  label_words_probs=label_words_probs
              )
  
          # convert to logits
          label_words_logits = paddle.log(label_words_probs + 1e-15)
          label_words_logits = label_words_logits
  
      # aggregate
      label_logits = self.aggregate(label_words_logits)
      return label_logits
  
imports: import paddle
  from abc import abstractmethod
  from typing import *
  import numpy
  import paddle.nn.functional
label_desc: Use image node_id 9 for calling the ErnieManualVerbalizer obj's underlying member method code with example usage: obj.process_logits(logits) and returns: label_logits