class_docstr: Storage Structure of Topic model, including vocabulary and word topic count.
      
docstr: Args:
      model_dir: the path of model directory
      config: ModelConfig class.
docstr_tok: ["Args",":","model_dir",":","the","path","of","model","directory","config",":","ModelConfig","class","."]
code: def __init__(self, model_dir, config):
      """
      Args:
          model_dir: the path of model directory
          config: ModelConfig class.
      """
      self.__word_topic = None  # Model parameter of word topic.
      self.__vocab = Vocab()  # Vocab data structure of model.
      self.__num_topics = config.num_topics  # Number of topics.
      self.__alpha = config.alpha
      self.__alpha_sum = self.__alpha * self.__num_topics
      self.__beta = config.beta
      self.__beta_sum = None
      self.__type = config.type  # Model type.
      self.__topic_sum = np.zeros(
          self.__num_topics, dtype="int64"
      )  # Accum sum of each topic in word topic.
      self.__topic_words = [[] for _ in range(self.__num_topics)]
      word_topic_path = os.path.join(model_dir, config.word_topic_file)
      vocab_path = os.path.join(model_dir, config.vocab_file)
      self.load_model(word_topic_path, vocab_path)
  
imports: import os
  from collections import OrderedDict
  import numpy
  from tqdm import tqdm
  from paddlehub.common.logger import logger
  from lda_webpage.vocab import Vocab, WordCount
label_desc: Use image node_id 1 to create a new TopicModel object from inherited base classes: object with example: obj = TopicModel(model_dir, config)