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 forward(self, item_seq, item_seq_len):
      item_seq_emb = self.item_embedding(item_seq)
      last_inputs = self.gather_indexes(item_seq_emb, item_seq_len - 1)
      org_memory = item_seq_emb
      ms = torch.div(
          torch.sum(org_memory, dim=1),
          item_seq_len.unsqueeze(1).float(),
      )
      alpha = self.count_alpha(org_memory, last_inputs, ms)
      vec = torch.matmul(alpha.unsqueeze(1), org_memory)
      ma = vec.squeeze(1) + ms
      hs = self.tanh(self.mlp_a(ma))
      ht = self.tanh(self.mlp_b(last_inputs))
      seq_output = hs * ht
      return seq_output
  
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 3 for calling the STAMP obj's underlying member method code with example usage: obj.forward(item_seq, item_seq_len) and returns: seq_output