class_docstr: FISM is an item-based model for generating top-N recommendations that learns the
  item-item similarity matrix as the product of two low dimensional latent factor matrices.
  These matrices are learned using a structural equation modeling approach, where in the
  value being estimated is not used for its own estimation.
class_docstr_tok: ["FISM","is","an","item-based","model","for","generating","top-N","recommendations","that","learns","the","item-item","similarity","matrix","as","the","product","of","two","low","dimensional","latent","factor","matrices",".","These","matrices","are","learned","using","a","structural","equation","modeling","approach",",","where","in","the","value","being","estimated","is","not","used","for","its","own","estimation","."]
docstr: forward the model by user
  
  Args:
      user_input (torch.Tensor): user input tensor
      item_num (torch.Tensor): user history interaction lens
      repeats (int, optional): the number of items to be evaluated
      pred_slc (torch.Tensor, optional): continuous index which controls the current evaluation items,
                                        if pred_slc is None, it will evaluate all items
  
  Returns:
      torch.Tensor: result
docstr_tok: ["forward","the","model","by","user","Args",":","user_input","(","torch.Tensor",")",":","user","input","tensor","item_num","(","torch.Tensor",")",":","user","history","interaction","lens","repeats","(","int",",","optional",")",":","the","number","of","items","to","be","evaluated","pred_slc","(","torch.Tensor",",","optional",")",":","continuous","index","which","controls","the","current","evaluation","items",",","if","pred_slc","is","None",",","it","will","evaluate","all","items","Returns",":","torch.Tensor",":","result"]
code: def user_forward(
      self, user_input, item_num, user_bias, repeats=None, pred_slc=None
  ):
      """forward the model by user
  
      Args:
          user_input (torch.Tensor): user input tensor
          item_num (torch.Tensor): user history interaction lens
          repeats (int, optional): the number of items to be evaluated
          pred_slc (torch.Tensor, optional): continuous index which controls the current evaluation items,
                                            if pred_slc is None, it will evaluate all items
  
      Returns:
          torch.Tensor: result
  
      """
      item_num = item_num.repeat(repeats, 1)
      user_history = self.item_src_embedding(
          user_input
      )  # inter_num x embedding_size
      user_history = user_history.repeat(
          repeats, 1, 1
      )  # target_items x inter_num x embedding_size
      if pred_slc is None:
          targets = (
              self.item_dst_embedding.weight
          )  # target_items x embedding_size
          item_bias = self.item_bias
      else:
          targets = self.item_dst_embedding(pred_slc)
          item_bias = self.item_bias[pred_slc]
      similarity = torch.bmm(
          user_history, targets.unsqueeze(2)
      ).squeeze(
          2
      )  # inter_num x target_items
      coeff = torch.pow(item_num.squeeze(1), -self.alpha)
      scores = (
          coeff.float() * torch.sum(similarity, dim=1)
          + user_bias
          + item_bias
      )
      return scores
  
file_path: RecBole/recbole/model/general_recommender/fism.py
imports: import torch
  import torch.nn
  from torch.nn.init import normal_
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.utils import InputType
label_desc: Use image node_id 6 for calling the FISM obj's underlying member method code with example usage: obj.user_forward(user_input, item_num, user_bias, repeats, pred_slc) and returns: scores