class_docstr: NGCF is a model that incorporate GNN for recommendation.
  We implement the model following the original author with a pairwise training mode.
class_docstr_tok: ["NGCF","is","a","model","that","incorporate","GNN","for","recommendation",".","We","implement","the","model","following","the","original","author","with","a","pairwise","training","mode","."]
code: def predict(self, interaction):
      user = interaction[self.USER_ID]
      item = interaction[self.ITEM_ID]
  
      user_all_embeddings, item_all_embeddings = self.forward()
  
      u_embeddings = user_all_embeddings[user]
      i_embeddings = item_all_embeddings[item]
      scores = torch.mul(u_embeddings, i_embeddings).sum(dim=1)
      return scores
  
file_path: RecBole/recbole/model/general_recommender/ngcf.py
imports: import numpy
  import scipy.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.layers import BiGNNLayer, SparseDropout
  from recbole.model.loss import BPRLoss, EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 7 for calling the NGCF obj's underlying member method code with example usage: obj.predict(interaction) and returns: scores