class_docstr: HRM can well capture both sequential behavior and users’ general taste by involving transaction and
  user representations in prediction.
  
  HRM user max- & average- pooling as a good helper.
code: def __init__(self, config, dataset):
      super(HRM, 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.pooling_type_layer_1 = config["pooling_type_layer_1"]
      self.pooling_type_layer_2 = config["pooling_type_layer_2"]
      self.high_order = config["high_order"]
      assert (
          self.high_order <= self.max_seq_length
      ), "high_order can't longer than the max_seq_length"
      self.reg_weight = config["reg_weight"]
      self.dropout_prob = config["dropout_prob"]
  
      # define the layers and loss type
      self.item_embedding = nn.Embedding(
          self.n_items, self.embedding_size, padding_idx=0
      )
      self.user_embedding = nn.Embedding(
          self.n_user, self.embedding_size
      )
      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 model
      self.apply(self._init_weights)
  
file_path: RecBole/recbole/model/sequential_recommender/hrm.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 HRM object from inherited base classes: SequentialRecommender with example: obj = HRM(config, dataset)