class_docstr: NAIS is an attention network, which is capable of distinguishing which historical items
  in a user profile are more important for a prediction. We just implement the model following
  the original author with a pointwise training mode.
  
  Note:
      instead of forming a minibatch as all training instances of a randomly sampled user which is
      mentioned in the original paper, we still train the model by a randomly sampled interactions.
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, 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
          bias = self.bias
      else:
          targets = self.item_dst_embedding(pred_slc)
          bias = self.bias[pred_slc]
      similarity = torch.bmm(
          user_history, targets.unsqueeze(2)
      ).squeeze(
          2
      )  # inter_num x target_items
      logits = self.attention_mlp(user_history, targets)
      scores = self.softmax(similarity, logits, item_num, bias)
      return scores
  
imports: import torch
  import torch.nn
  from torch.nn.init import constant_, normal_, xavier_normal_
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.layers import MLPLayers
  from recbole.utils import InputType
label_desc: Use image node_id 10 for calling the NAIS obj's underlying member method code with example usage: obj.user_forward(user_input, item_num, repeats, pred_slc) and returns: scores