class_docstr: Hierarchical text classification model.
class_docstr_tok: ["Hierarchical","text","classification","model","."]
code: def __init__(self, config, **kwargs):
      super().__init__(config, **kwargs)
  
      logging.info("Initialize HierachicalModel...")
  
      self.use_pretrained_embedding = config["model"][
          "use_pre_train_emb"
      ]
      if self.use_pretrained_embedding:
          self.embedding_path = config["model"]["embedding_path"]
          logging.info(
              "Loading embedding file from: {}".format(
                  self.embedding_path
              )
          )
          self._word_embedding_init = pickle.load(
              open(self.embedding_path, "rb")
          )
          self.embed_initializer = tf.constant_initializer(
              self._word_embedding_init
          )
      else:
          self.embed_initializer = tf.random_uniform_initializer(
              -0.1, 0.1
          )
  
file_path: delta/delta/models/text_hierarchical_model.py
imports: import pickle
  from absl import logging
  import delta.compat
  import delta.utils
  import delta.layers
  from delta.layers.utils import cut_or_padding
  from delta.layers.utils import compute_sen_lens
  from delta.layers.utils import compute_doc_lens
  from delta.layers.utils import split_one_doc_to_true_len_sens
  from delta.models.text_cls_model import TextClassModel
  from delta.utils.register import registers
label_desc: Use image node_id 1 to create a new HierarchicalModel object from inherited base classes: TextClassModel with example: obj = HierarchicalModel(config)