class_docstr: MKR is a Multi-task feature learning approach for Knowledge graph enhanced Recommendation. It is a deep
  end-to-end framework that utilizes knowledge graph embedding task to assist recommendation task. The two
  tasks are associated by cross&compress units, which automatically share latent features and learn high-order
  interactions between items in recommender systems and entities in the knowledge graph.
class_docstr_tok: ["MKR","is","a","Multi-task","feature","learning","approach","for","Knowledge","graph","enhanced","Recommendation",".","It","is","a","deep","end-to-end","framework","that","utilizes","knowledge","graph","embedding","task","to","assist","recommendation","task",".","The","two","tasks","are","associated","by","cross","&","compress","units",",","which","automatically","share","latent","features","and","learn","high-order","interactions","between","items","in","recommender","systems","and","entities","in","the","knowledge","graph","."]
code: def __init__(self, config, dataset):
      super(MKR, self).__init__(config, dataset)
  
      # load parameters info
      self.LABEL = config["LABEL_FIELD"]
      self.embedding_size = config["embedding_size"]
      self.kg_embedding_size = config["kg_embedding_size"]
      self.L = config["low_layers_num"]  # the number of low layers
      self.H = config["high_layers_num"]  # the number of high layers
      self.reg_weight = config["reg_weight"]
      self.use_inner_product = config["use_inner_product"]
      self.dropout_prob = config["dropout_prob"]
  
      # init embeddings
      self.user_embeddings_lookup = nn.Embedding(
          self.n_users, self.embedding_size
      )
      self.item_embeddings_lookup = nn.Embedding(
          self.n_entities, self.embedding_size
      )
      self.entity_embeddings_lookup = nn.Embedding(
          self.n_entities, self.embedding_size
      )
      self.relation_embeddings_lookup = nn.Embedding(
          self.n_relations, self.embedding_size
      )
  
      # define layers
      lower_mlp_layers = []
      high_mlp_layers = []
      for i in range(self.L + 1):
          lower_mlp_layers.append(self.embedding_size)
      for i in range(self.H):
          high_mlp_layers.append(self.embedding_size * 2)
  
      self.user_mlp = MLPLayers(
          lower_mlp_layers, self.dropout_prob, "sigmoid"
      )
      self.tail_mlp = MLPLayers(
          lower_mlp_layers, self.dropout_prob, "sigmoid"
      )
      self.cc_unit = nn.Sequential()
      for i_cnt in range(self.L):
          self.cc_unit.add_module(
              "cc_unit{}".format(i_cnt),
              CrossCompressUnit(self.embedding_size),
          )
      self.kge_mlp = MLPLayers(
          high_mlp_layers, self.dropout_prob, "sigmoid"
      )
      self.kge_pred_mlp = MLPLayers(
          [self.embedding_size * 2, self.embedding_size],
          self.dropout_prob,
          "sigmoid",
      )
      if self.use_inner_product == False:
          self.rs_pred_mlp = MLPLayers(
              [self.embedding_size * 2, 1], self.dropout_prob, "sigmoid"
          )
          self.rs_mlp = MLPLayers(
              high_mlp_layers, self.dropout_prob, "sigmoid"
          )
  
      # loss
      self.sigmoid_BCE = nn.BCEWithLogitsLoss()
  
      # parameters initialization
      self.apply(xavier_normal_initialization)
  
file_path: RecBole/recbole/model/knowledge_aware_recommender/mkr.py
imports: import torch
  import torch.nn
  from recbole.model.abstract_recommender import KnowledgeRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.layers import MLPLayers
  from recbole.utils import InputType
label_desc: Use image node_id 1 to create a new MKR object from inherited base classes: KnowledgeRecommender with example: obj = MKR(config, dataset)