class_docstr: The base class for all pretrained models. It provides some attributes and
  common methods for all pretrained models, including attributes `init_config`,
  `config` for initialized arguments and methods for saving, loading.
  It also includes some class attributes (should be set by derived classes):
  - `model_config_file` (str): represents the file name for saving and loading
    model configuration, it's value is `model_config.json`.
  - `resource_files_names` (dict): use this to map resources to specific file
    names for saving and loading.
  - `pretrained_resource_files_map` (dict): The dict has the same keys as
    `resource_files_names`, the values are also dict mapping specific pretrained
    model name to URL linking to pretrained model.
  - `pretrained_init_configuration` (dict): The dict has pretrained model names
    as keys, and the values are also dict preserving corresponding configuration
    for model initialization.
  - `base_model_prefix` (str): represents the the attribute associated to the
    base model in derived classes of the same architecture adding layers on
    top of the base model.
class_docstr_tok: ["The","base","class","for","all","pretrained","models",".","It","provides","some","attributes","and","common","methods","for","all","pretrained","models",",","including","attributes","`","init_config","`",",","`","config","`","for","initialized","arguments","and","methods","for","saving",",","loading",".","It","also","includes","some","class","attributes","(","should","be","set","by","derived","classes",")",":","-","`","model_config_file","`","(","str",")",":","represents","the","file","name","for","saving","and","loading","model","configuration",",","it","'s","value","is","`","model_config.json","`",".","-","`","resource_files_names","`","(","dict",")",":","use","this","to","map","resources","to","specific","file","names","for","saving","and","loading",".","-","`","pretrained_resource_files_map","`","(","dict",")",":","The","dict","has","the","same","keys","as","`","resource_files_names","`",",","the","values","are","also","dict","mapping","specific","pretrained","model","name","to","URL","linking","to","pretrained","model",".","-","`","pretrained_init_configuration","`","(","dict",")",":","The","dict","has","pretrained","model","names","as","keys",",","and","the","values","are","also","dict","preserving","corresponding","configuration","for","model","initialization",".","-","`","base_model_prefix","`","(","str",")",":","represents","the","the","attribute","associated","to","the","base","model","in","derived","classes","of","the","same","architecture","adding","layers","on","top","of","the","base","model","."]
code: def get_input_embeddings(self):
      base_model = getattr(self, self.base_model_prefix, self)
      if base_model is not self:
          return base_model.get_input_embeddings()
      else:
          raise NotImplementedError
  
imports: import copy
  import functools
  import inspect
  import io
  import json
  import os
  import six
  from typing import List, Tuple, Union
  import paddle
  import paddle.nn
  from packaging.version import Version
  from paddle.dataset.common import DATA_HOME
  from paddle.utils.download import get_path_from_url
  from paddlehub.module.module import serving, RunModule, runnable
  from paddlehub.utils.log import logger
  from paddlehub.utils.utils import reseg_token_label
  import paddlenlp
  from paddlenlp.embeddings.token_embedding import EMBEDDING_HOME, EMBEDDING_URL_ROOT
  from paddlenlp.data import JiebaTokenizer
  from paddlehub.compat.module.nlp_module import DataFormatError
label_desc: Use image node_id 4 for calling the PretrainedModel obj's underlying member method code with example usage: obj.get_input_embeddings() and returns: base_model