code: def forward(self, item_seq, item_seq_len):
      x_u = self.item_embedding(item_seq).to(self.device)  # [B, N, D]
  
      # concept activation
      # sort by inner product
      x = torch.matmul(x_u, self.w1)
      x = torch.tanh(x)
      x = torch.matmul(x, self.w2)
      a = F.softmax(x, dim=1)
      z_u = torch.matmul(a.unsqueeze(2).transpose(1, 2), x_u).transpose(
          1, 2
      )
      s_u = torch.matmul(self.C.weight, z_u)
      s_u = s_u.squeeze(2)
      idx = s_u.argsort(1)[:, -self.k :]
      s_u_idx = s_u.sort(1)[0][:, -self.k :]
      c_u = self.C(idx)
      sigs = torch.sigmoid(
          s_u_idx.unsqueeze(2).repeat(1, 1, self.embedding_size)
      )
      C_u = c_u.mul(sigs)
  
      # intention assignment
      # use matrix multiplication instead of cos()
      w3_x_u_norm = F.normalize(x_u.matmul(self.w3), p=2, dim=2)
      C_u_norm = self.ln2(C_u)
      P_k_t = torch.bmm(w3_x_u_norm, C_u_norm.transpose(1, 2))
      P_k_t_b = F.softmax(P_k_t, dim=2)
      P_k_t_b_t = P_k_t_b.transpose(1, 2)
  
      # attention weighting
      a_k = x_u.unsqueeze(1).repeat(1, self.k, 1, 1).matmul(self.w_k_1)
      P_t_k = F.softmax(
          torch.tanh(a_k)
          .matmul(self.w_k_2.reshape(self.k, self.embedding_size, 1))
          .squeeze(3),
          dim=2,
      )
  
      # interest embedding generation
      mul_p = P_k_t_b_t.mul(P_t_k)
      x_u_re = x_u.unsqueeze(1).repeat(1, self.k, 1, 1)
      mul_p_re = mul_p.unsqueeze(3)
      delta_k = x_u_re.mul(mul_p_re).sum(2)
      delta_k = F.normalize(delta_k, p=2, dim=2)
  
      # prototype sequence
      x_u_bar = P_k_t_b.matmul(C_u)
      C_apt = F.softmax(
          torch.tanh(x_u_bar.matmul(self.w3)).matmul(self.w4), dim=1
      )
      C_apt = C_apt.reshape(-1, 1, self.max_seq_length).matmul(x_u_bar)
      C_apt = self.ln4(C_apt)
  
      # aggregation weight
      e_k = (
          delta_k.bmm(C_apt.reshape(-1, self.embedding_size, 1))
          / self.tau
      )
      e_k_u = F.softmax(e_k.squeeze(2), dim=1)
      v_u = e_k_u.unsqueeze(2).mul(delta_k).sum(dim=1)
  
      return v_u
  
file_path: RecBole/recbole/model/sequential_recommender/sine.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.init import xavier_normal_
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.loss import BPRLoss
  from recbole.utils import InputType
label_desc: Use image node_id 7 for calling the SINE obj's underlying member method code with example usage: obj.forward(item_seq, item_seq_len) and returns: v_u