class_docstr: Shallow models for knowledge representation learning.
      
code: def __init__(self, model_name, trigraph, args=None):
      super(KGEModel, self).__init__()
      self._args = args
  
      # config
      self._num_ents = trigraph.num_ents
      self._num_rels = trigraph.num_rels
      self._ent_dim = args.ent_dim
      self._rel_dim = args.rel_dim
      self._ent_emb_on_cpu = args.ent_emb_on_cpu
      self._rel_emb_on_cpu = args.rel_emb_on_cpu
      self._num_chunks = args.num_chunks
      self._lr = args.cpu_lr if args.mix_cpu_gpu else None
      self._optim = args.cpu_optimizer if args.mix_cpu_gpu else None
  
      # model
      self._model_name = model_name
      self._score_func = self._init_score_function(
          self._model_name, args
      )
      self._init_func = InitFunction(args)
  
      # embedding
      self._ent_weight_path = os.path.join(
          args.save_path, "__ent_embedding.npy"
      )
      self._rel_weight_path = os.path.join(
          args.save_path, "__rel_embedding.npy"
      )
      self.ent_embedding, self.rel_embedding = self._init_embedding()
  
      self._init_features(trigraph)
  
imports: import os
  import json
  import math
  import warnings
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from pgl.utils.shared_embedding import SharedEmbedding
  from models.score_funcs import TransEScore, RotatEScore, DistMultScore, ComplExScore, QuatEScore, OTEScore
  from models.init_func import InitFunction
  from utils import uniform, timer_wrapper
label_desc: Use image node_id 1 to create a new KGEModel object from inherited base classes: nn with example: obj = KGEModel(model_name, trigraph, args)