class_docstr: BPR is a basic matrix factorization model that be trained in the pairwise way.
class_docstr_tok: ["BPR","is","a","basic","matrix","factorization","model","that","be","trained","in","the","pairwise","way","."]
code: def __init__(self, config, dataset):
      super(BPR, self).__init__(config, dataset)
  
      # load parameters info
      self.embedding_size = config["embedding_size"]
  
      # define layers and loss
      self.user_embedding = nn.Embedding(
          self.n_users, self.embedding_size
      )
      self.item_embedding = nn.Embedding(
          self.n_items, self.embedding_size
      )
      self.loss = BPRLoss()
  
      # parameters initialization
      self.apply(xavier_normal_initialization)
  
file_path: RecBole/recbole/model/general_recommender/bpr.py
imports: import torch
  import torch.nn
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.loss import BPRLoss
  from recbole.utils import InputType
label_desc: Use image node_id 1 to create a new BPR object from inherited base classes: GeneralRecommender with example: obj = BPR(config, dataset)