class_docstr: models a user’s click to an item in two terms: the personal preference of the user for the item,
  and the relationships between this item and other items clicked by the user
class_docstr_tok: ["models","a","user","\u2019","s","click","to","an","item","in","two","terms",":","the","personal","preference","of","the","user","for","the","item",",","and","the","relationships","between","this","item","and","other","items","clicked","by","the","user"]
code: def __init__(self, config, dataset):
      super(NPE, self).__init__(config, dataset)
  
      # load the dataset information
      self.n_user = dataset.num(self.USER_ID)
      self.device = config["device"]
  
      # load the parameters information
      self.embedding_size = config["embedding_size"]
      self.dropout_prob = config["dropout_prob"]
  
      # define layers and loss type
      self.user_embedding = nn.Embedding(
          self.n_user, self.embedding_size
      )
      self.item_embedding = nn.Embedding(
          self.n_items, self.embedding_size
      )
      self.embedding_seq_item = nn.Embedding(
          self.n_items, self.embedding_size, padding_idx=0
      )
      self.relu = nn.ReLU()
      self.dropout = nn.Dropout(self.dropout_prob)
  
      self.loss_type = config["loss_type"]
      if self.loss_type == "BPR":
          self.loss_fct = BPRLoss()
      elif self.loss_type == "CE":
          self.loss_fct = nn.CrossEntropyLoss()
      else:
          raise NotImplementedError(
              "Make sure 'loss_type' in ['BPR', 'CE']!"
          )
  
      # init the parameters of the module
      self.apply(self._init_weights)
  
file_path: RecBole/recbole/model/sequential_recommender/npe.py
imports: import torch
  import torch.nn
  from torch.nn.init import xavier_normal_
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.loss import BPRLoss
label_desc: Use image node_id 1 to create a new NPE object from inherited base classes: SequentialRecommender with example: obj = NPE(config, dataset)