class_docstr: KGAT is a knowledge-based recommendation model. It combines knowledge graph and the user-item interaction
  graph to a new graph called collaborative knowledge graph (CKG). This model learns the representations of users and
  items by exploiting the structure of CKG. It adopts a GNN-based architecture and define the attention on the CKG.
class_docstr_tok: ["KGAT","is","a","knowledge-based","recommendation","model",".","It","combines","knowledge","graph","and","the","user-item","interaction","graph","to","a","new","graph","called","collaborative","knowledge","graph","(","CKG",")",".","This","model","learns","the","representations","of","users","and","items","by","exploiting","the","structure","of","CKG",".","It","adopts","a","GNN-based","architecture","and","define","the","attention","on","the","CKG","."]
code: def _get_kg_embedding(self, h, r, pos_t, neg_t):
      h_e = self.entity_embedding(h).unsqueeze(1)
      pos_t_e = self.entity_embedding(pos_t).unsqueeze(1)
      neg_t_e = self.entity_embedding(neg_t).unsqueeze(1)
      r_e = self.relation_embedding(r)
      r_trans_w = self.trans_w(r).view(
          r.size(0), self.embedding_size, self.kg_embedding_size
      )
  
      h_e = torch.bmm(h_e, r_trans_w).squeeze(1)
      pos_t_e = torch.bmm(pos_t_e, r_trans_w).squeeze(1)
      neg_t_e = torch.bmm(neg_t_e, r_trans_w).squeeze(1)
  
      return h_e, r_e, pos_t_e, neg_t_e
  
imports: import numpy
  import scipy.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  from recbole.model.abstract_recommender import KnowledgeRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.loss import BPRLoss, EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 5 for calling the KGAT obj's underlying member method code with example usage: obj._get_kg_embedding(h, r, pos_t, neg_t) and returns: h_e,  r_e,  pos_t_e,  neg_t_e