class_docstr: Args:
      model (:obj:`PreTrainedModel`): The pre-trained language model for the current prompt-learning task.
      tokenizer (:obj:`PreTrainedTokenizer`): A tokenizer to appoint the vocabulary and the tokenization strategy.
      text (:obj:`Optional[List[str]]`, optional): manual template format. Defaults to None.
      soft_token (:obj:`str`, optional): The special token for soft token. Default to ``<soft>``
      placeholder_mapping (:obj:`dict`): A place holder to represent the original input text. Default to ``{'<text_a>': 'text_a', '<text_b>': 'text_b'}``
class_docstr_tok: ["Args",":","model","(",":","obj",":","`","PreTrainedModel","`",")",":","The","pre-trained","language","model","for","the","current","prompt-learning","task",".","tokenizer","(",":","obj",":","`","PreTrainedTokenizer","`",")",":","A","tokenizer","to","appoint","the","vocabulary","and","the","tokenization","strategy",".","text","(",":","obj",":","`","Optional","[","List","[","str","]","]","`",",","optional",")",":","manual","template","format",".","Defaults","to","None",".","soft_token","(",":","obj",":","`","str","`",",","optional",")",":","The","special","token","for","soft","token",".","Default","to","``","<","soft",">","``","placeholder_mapping","(",":","obj",":","`","dict","`",")",":","A","place","holder","to","represent","the","original","input","text",".","Default","to","``","{","'","<","text_a",">","'",":","'text_a","'",",","'","<","text_b",">","'",":","'text_b","'","}","``"]
code: def __init__(
      self,
      model: PreTrainedModel,
      tokenizer: PreTrainedTokenizer,
      text: Optional[str] = None,
      placeholder_mapping: dict = {
          "<text_a>": "text_a",
          "<text_b>": "text_b",
      },
  ):
      super().__init__(
          model=model,
          tokenizer=tokenizer,
          prompt_encoder_type="mlp",
          text=text,
          placeholder_mapping=placeholder_mapping,
      )
  
file_path: OpenPrompt/openprompt/prompts/ptr_prompts.py
imports: import json
  from openprompt.data_utils import InputFeatures
  import os
  import torch
  from torch import nn
  from typing import *
  from transformers import PreTrainedModel
  from transformers.tokenization_utils import PreTrainedTokenizer
  from openprompt import Verbalizer
  from openprompt.prompts import One2oneVerbalizer, PtuningTemplate
label_desc: Use image node_id 1 to create a new PTRTemplate object from inherited base classes: PtuningTemplate with example: obj = PTRTemplate(model, tokenizer, text, placeholder_mapping)