code: def __init__(self):
      super(GPT2_Base_CN, self).__init__()
      # 加载 PaddleNLP 自带的预训练中文 GPT2 模型
      self.model = GPT2ForPretraining.from_pretrained("gpt2-base-cn")
  
      # 设置模型为评估状态
      self.model.eval()
  
      # 加载编解码器
      self.tokenizer = GPT2ChineseTokenizer.from_pretrained(
          "gpt2-base-cn"
      )
  
      # 初始化编码器
      _ = self.tokenizer.encode("_")
  
file_path: PaddleHub/modules/text/text_generation/GPT2_Base_CN/module.py
imports: import paddle
  import numpy
  import paddle.nn
  from paddlehub.module.module import moduleinfo, serving
  from paddlenlp.transformers import GPT2ForPretraining, GPT2ChineseTokenizer
label_desc: Use image node_id 1 to create a new GPT2_Base_CN object from inherited base classes: nn with example: obj = GPT2_Base_CN()