class_docstr: KSR integrates the RNN-based networks with Key-Value Memory Network (KV-MN).
  And it further incorporates knowledge base (KB) information to enhance the semantic representation of KV-MN.
class_docstr_tok: ["KSR","integrates","the","RNN-based","networks","with","Key-Value","Memory","Network","(","KV-MN",")",".","And","it","further","incorporates","knowledge","base","(","KB",")","information","to","enhance","the","semantic","representation","of","KV-MN","."]
code: def predict(self, interaction):
      item_seq = interaction[self.ITEM_SEQ]
      item_seq_len = interaction[self.ITEM_SEQ_LEN]
      test_item = interaction[self.ITEM_ID]
      seq_output = self.forward(item_seq, item_seq_len)
      test_item_emb = self._get_item_comb_embedding(test_item)
      scores = torch.mul(seq_output, test_item_emb).sum(dim=1)  # [B]
      return scores
  
file_path: RecBole/recbole/model/sequential_recommender/ksr.py
imports: import torch
  from torch import nn
  from torch.nn.init import xavier_uniform_, xavier_normal_
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.loss import BPRLoss
label_desc: Use image node_id 10 for calling the KSR obj's underlying member method code with example usage: obj.predict(interaction) and returns: scores