class_docstr: This is the implementation of knowledeagble verbalizer, which uses external knowledge to expand the set of label words.
  This class inherit the ``ManualVerbalizer`` class.
  
  Args:
      tokenizer (:obj:`PreTrainedTokenizer`): The tokenizer of the current pre-trained model to point out the vocabulary.
      classes (:obj:`classes`): The classes (or labels) of the current task.
      prefix (:obj:`str`, optional): The prefix string of the verbalizer.
      multi_token_handler (:obj:`str`, optional): The handling strategy for multiple tokens produced by the tokenizer.
      max_token_split (:obj:`int`, optional):
      verbalizer_lr (:obj:`float`, optional): The learning rate of the verbalizer optimization.
      candidate_frac (:obj:`float`, optional):
docstr: Use weight to aggregate the logots of label words.
  
  Args:
      label_words_logits(:obj:`torch.Tensor`): The logits of the label words.
  
  Returns:
      :obj:`torch.Tensor`: The aggregated logits from the label words.
docstr_tok: ["Use","weight","to","aggregate","the","logots","of","label","words",".","Args",":","label_words_logits","(",":","obj",":","`","torch.Tensor","`",")",":","The","logits","of","the","label","words",".","Returns",":",":","obj",":","`","torch.Tensor","`",":","The","aggregated","logits","from","the","label","words","."]
code: def aggregate(self, label_words_logits: torch.Tensor) -> torch.Tensor:
      r"""Use weight to aggregate the logots of label words.
  
      Args:
          label_words_logits(:obj:`torch.Tensor`): The logits of the label words.
  
      Returns:
          :obj:`torch.Tensor`: The aggregated logits from the label words.
      """
      if not self.training:
          label_words_weights = F.softmax(
              self.pred_temp * self.label_words_weights
              - 10000 * (1 - self.label_words_mask),
              dim=-1,
          )
      else:
          label_words_weights = F.softmax(
              self.label_words_weights
              - 10000 * (1 - self.label_words_mask),
              dim=-1,
          )
      label_words_logits = (
          label_words_logits
          * self.label_words_mask
          * label_words_weights
      ).sum(-1)
      return label_words_logits
  
imports: import os
  from openprompt.prompts.manual_template import ManualTemplate
  from transformers.tokenization_utils import PreTrainedTokenizer
  from transformers.utils.dummy_pt_objects import PreTrainedModel
  from openprompt.data_utils import InputFeatures
  import re
  from openprompt.prompts.manual_verbalizer import ManualVerbalizer
  from typing import *
  import torch
  import torch.nn
  import torch.nn.functional
  from openprompt.utils.logging import logger
label_desc: Use image node_id 8 for calling the KnowledgeableVerbalizer obj's underlying member method code with example usage: obj.aggregate(label_words_logits) and returns: label_words_logits