class_docstr: ``PromptModel`` with a classification head on top. The classification head will map
  the logits in all position of the sequence (return value of a ``PromptModel``) into the
  logits of the labels, using a verbalizer.
  
  Args:
      plm (:obj:`PretrainedModel`): A pre-traiend model you decide to use for classification, e.g. BERT.
      template (:obj:`Template`): A ``Template`` object you use to wrap the input text for classification, e.g. ``ManualTemplate``.
      verbalizer (:obj:`Verbalizer`): A ``Verbalizer`` object you use to project the labels to label words for classification, e.g. ``ManualVerbalizer``.
      freeze_plm (:obj:`bool`): whether or not to freeze the pretrained language model
      plm_eval_mode (:obj:`bool`): this is a stronger freezing mode than freeze_plm, i.e. the dropout of the model is turned off. No matter whether the other part is set to train.
class_docstr_tok: ["``","PromptModel","``","with","a","classification","head","on","top",".","The","classification","head","will","map","the","logits","in","all","position","of","the","sequence","(","return","value","of","a","``","PromptModel","``",")","into","the","logits","of","the","labels",",","using","a","verbalizer",".","Args",":","plm","(",":","obj",":","`","PretrainedModel","`",")",":","A","pre-traiend","model","you","decide","to","use","for","classification",",","e.g",".","BERT",".","template","(",":","obj",":","`","Template","`",")",":","A","``","Template","``","object","you","use","to","wrap","the","input","text","for","classification",",","e.g",".","``","ManualTemplate","``",".","verbalizer","(",":","obj",":","`","Verbalizer","`",")",":","A","``","Verbalizer","``","object","you","use","to","project","the","labels","to","label","words","for","classification",",","e.g",".","``","ManualVerbalizer","``",".","freeze_plm","(",":","obj",":","`","bool","`",")",":","whether","or","not","to","freeze","the","pretrained","language","model","plm_eval_mode","(",":","obj",":","`","bool","`",")",":","this","is","a","stronger","freezing","mode","than","freeze_plm",",","i.e",".","the","dropout","of","the","model","is","turned","off",".","No","matter","whether","the","other","part","is","set","to","train","."]
code: def __init__(
      self,
      plm: PreTrainedModel,
      template: Template,
      verbalizer: Verbalizer,
      freeze_plm: bool = False,
      plm_eval_mode: bool = False,
  ):
      super().__init__()
      self.prompt_model = PromptModel(
          plm, template, freeze_plm, plm_eval_mode
      )
      self.verbalizer = verbalizer
  
imports: from pickle import FALSE
  from torch.utils.data.sampler import RandomSampler
  from transformers.configuration_utils import PretrainedConfig
  from transformers.generation_utils import GenerationMixin
  import torch
  import torch.nn
  from torch.utils.data import Dataset
  from typing import *
  from openprompt.data_utils import InputExample, InputFeatures
  from torch.utils.data._utils.collate import default_collate
  from tqdm.std import tqdm
  from transformers.tokenization_utils import PreTrainedTokenizer
  from transformers.utils.dummy_pt_objects import PreTrainedModel
  from openprompt.plms.utils import TokenizerWrapper
  from openprompt.prompt_base import Template, Verbalizer
  from collections import defaultdict
  from openprompt.utils import round_list, signature
  import numpy
  from torch.utils.data import DataLoader
  from yacs.config import CfgNode
  from openprompt.utils.logging import logger
  from transformers import AdamW, get_linear_schedule_with_warmup
label_desc: Use image node_id 1 to create a new PromptForClassification object from inherited base classes: nn with example: obj = PromptForClassification(plm, template, verbalizer, freeze_plm, plm_eval_mode)