class_docstr: STAMP is capable of capturing users’ general interests from the long-term memory of a session context,
  whilst taking into account users’ current interests from the short-term memory of the last-clicks.
  
  
  Note:
  
      According to the test results, we made a little modification to the score function mentioned in the paper,
      and did not use the final sigmoid activation function.
class_docstr_tok: ["STAMP","is","capable","of","capturing","users","\u2019","general","interests","from","the","long-term","memory","of","a","session","context",",","whilst","taking","into","account","users","\u2019","current","interests","from","the","short-term","memory","of","the","last-clicks",".","Note",":","According","to","the","test","results",",","we","made","a","little","modification","to","the","score","function","mentioned","in","the","paper",",","and","did","not","use","the","final","sigmoid","activation","function","."]
code: def __init__(self, config, dataset):
      super(STAMP, self).__init__(config, dataset)
  
      # load parameters info
      self.embedding_size = config["embedding_size"]
  
      # define layers and loss
      self.item_embedding = nn.Embedding(
          self.n_items, self.embedding_size, padding_idx=0
      )
      self.w1 = nn.Linear(
          self.embedding_size, self.embedding_size, bias=False
      )
      self.w2 = nn.Linear(
          self.embedding_size, self.embedding_size, bias=False
      )
      self.w3 = nn.Linear(
          self.embedding_size, self.embedding_size, bias=False
      )
      self.w0 = nn.Linear(self.embedding_size, 1, bias=False)
      self.b_a = nn.Parameter(
          torch.zeros(self.embedding_size), requires_grad=True
      )
      self.mlp_a = nn.Linear(
          self.embedding_size, self.embedding_size, bias=True
      )
      self.mlp_b = nn.Linear(
          self.embedding_size, self.embedding_size, bias=True
      )
      self.sigmoid = nn.Sigmoid()
      self.tanh = nn.Tanh()
      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']!"
          )
  
      # # parameters initialization
      self.apply(self._init_weights)
  
file_path: RecBole/recbole/model/sequential_recommender/stamp.py
imports: import torch
  from torch import nn
  from torch.nn.init import 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 STAMP object from inherited base classes: SequentialRecommender with example: obj = STAMP(config, dataset)