class_docstr: Base model.
docstr: Init model
docstr_tok: ["Init","model"]
code: def __init__(self, **kwargs):
      """
      Init model
      """
      # Needed parameters
      self.model_name = kwargs["model_name"]
      self.data_reader = kwargs["data_reader"]
      self._hidden_size = kwargs["hidden_size"]
      self._learning_rate = kwargs["learning_rate"]
      self._optimizer = kwargs["optimizer"]
      self.args = kwargs["args"]
  
      # Optional parameters
      if "margin" in kwargs:
          self._margin = kwargs["margin"]
      self._prefix = "%s_%s_dim=%d_" % (
          self.model_name,
          self.data_reader.name,
          self._hidden_size,
      )
      self.ent_name = self._prefix + "entity_embeddings"
      self.rel_name = self._prefix + "relation_embeddings"
  
      self._entity_total = self.data_reader.entity_total
      self._relation_total = self.data_reader.relation_total
      self._ent_shape = [self._entity_total, self._hidden_size]
      self._rel_shape = [self._relation_total, self._hidden_size]
  
file_path: PGL/legacy/examples/pgl-ke/model/Model.py
imports: from paddle import fluid
label_desc: Use image node_id 1 to create a new Model object from inherited base classes: object with example: obj = Model()