class_docstr: SimpleX is a simple, unified collaborative filtering model.
  
  SimpleX presents a simple and easy-to-understand model. Its advantage lies
  in its loss function, which uses a larger number of negative samples and
  sets a threshold to filter out less informative samples, it also uses
  relative weights to control the balance of positive-sample loss
  and negative-sample loss.
  
  We implement the model following the original author with a pairwise training mode.
docstr: Get the cosine similarity between user and item
  
  Args:
      user_e (torch.Tensor): User's feature vector, shape: [user_num, embedding_size]
      item_e (torch.Tensor): Item's feature vector,
          shape: [user_num, item_num, embedding_size]
  
  Returns:
      torch.Tensor: Cosine similarity between user and item, shape: [user_num, item_num]
docstr_tok: ["Get","the","cosine","similarity","between","user","and","item","Args",":","user_e","(","torch.Tensor",")",":","User","'s","feature","vector",",","shape",":","[","user_num",",","embedding_size","]","item_e","(","torch.Tensor",")",":","Item","'s","feature","vector",",","shape",":","[","user_num",",","item_num",",","embedding_size","]","Returns",":","torch.Tensor",":","Cosine","similarity","between","user","and","item",",","shape",":","[","user_num",",","item_num","]"]
code: def get_cos(self, user_e, item_e):
      r"""Get the cosine similarity between user and item
  
      Args:
          user_e (torch.Tensor): User's feature vector, shape: [user_num, embedding_size]
          item_e (torch.Tensor): Item's feature vector,
              shape: [user_num, item_num, embedding_size]
  
      Returns:
          torch.Tensor: Cosine similarity between user and item, shape: [user_num, item_num]
      """
      user_e = F.normalize(user_e, dim=1)
      # [user_num, embedding_size, 1]
      user_e = user_e.unsqueeze(2)
      item_e = F.normalize(item_e, dim=2)
      UI_cos = torch.matmul(item_e, user_e)
      return UI_cos.squeeze(2)
  
file_path: RecBole/recbole/model/general_recommender/simplex.py
imports: import torch
  from torch import nn
  import torch.nn.functional
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.loss import EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 3 for calling the SimpleX obj's underlying member method code with example usage: obj.get_cos(user_e, item_e) and returns: UI_cos