def process_logits(self, logits: torch.Tensor, **kwargs):
    'A whole framework to process the original logits over the vocabulary, which contains four steps:\n\n        (1) Project the logits into logits of label words\n\n        if self.post_log_softmax is True:\n\n            (2) Normalize over all label words\n\n            (3) Calibrate (optional)\n\n        Args:\n            logits (:obj:`torch.Tensor`): The orginal logits.\n\n        Returns:\n            (:obj:`torch.Tensor`): The final processed logits over the label words set.\n        '
    label_words_logits = self.project(logits, **kwargs)
    if self.post_log_softmax:
        label_words_probs = self.normalize(label_words_logits)
        if (hasattr(self, '_calibrate_logits') and (self._calibrate_logits is not None)):
            label_words_probs = self.calibrate(label_words_probs=label_words_probs)
        label_words_logits = torch.log((label_words_probs + 1e-15))
    return label_words_logits
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)

Args:
    logits (:obj:`torch.Tensor`): The orginal logits.

Returns:
    (:obj:`torch.Tensor`): The final processed logits over the label words set.
def process_logits(self, logits: torch.Tensor, **kwargs):
    'A whole framework to process the original logits over the vocabulary, which contains four steps:\n\n        (1) Project the logits into logits of label words\n\n        if self.post_log_softmax is True:\n\n            (2) Normalize over all label words\n\n            (3) Calibrate (optional)\n\n        Args:\n            logits (:obj:`torch.Tensor`): The orginal logits.\n\n        Returns:\n            (:obj:`torch.Tensor`): The final processed logits over the label words set.\n        '
    label_words_logits = self.project(logits, **kwargs)
    if self.post_log_softmax:
        label_words_probs = self.normalize(label_words_logits)
        if (hasattr(self, '_calibrate_logits') and (self._calibrate_logits is not None)):
            label_words_probs = self.calibrate(label_words_probs=label_words_probs)
        label_words_logits = torch.log((label_words_probs + 1e-15))
    return label_words_logits