docstr: initialize with the necessary elements
docstr_tok: ["initialize","with","the","necessary","elements"]
code: def __init__(self):
      """
      initialize with the necessary elements
      """
      self.tokenizer = ErnieTokenizer.from_pretrained("ernie-1.0")
      self.rev_dict = self.tokenizer.vocab.idx_to_token
      self.rev_lookup = np.vectorize(lambda i: self.rev_dict[i])
      self._model = None
  
imports: import os
  import sys
  import shutil
  from copy import deepcopy
  import numpy
  import paddle
  import paddle.nn
  from paddle.io import DataLoader
  import paddlehub
  from paddlehub.common.logger import logger
  from paddlehub.module.module import moduleinfo
  from paddlenlp.datasets import MapDataset
  from paddlenlp.data import Stack, Tuple, Pad
  from paddlenlp.metrics import Rouge1, Rouge2
  from paddlenlp.transformers import ErnieTokenizer, ErnieForGeneration, LinearDecayWithWarmup
  from .encode import convert_example, after_padding
  from .decode import post_process, beam_search_infilling
  from .model import StackModel
label_desc: Use image node_id 1 to create a new ErnieGen object  with example: obj = ErnieGen()