class_docstr: SHAN exploit the Hierarchical Attention Network to get the long-short term preference
  first get the long term purpose and then fuse the long-term with recent items to get long-short term purpose
class_docstr_tok: ["SHAN","exploit","the","Hierarchical","Attention","Network","to","get","the","long-short","term","preference","first","get","the","long","term","purpose","and","then","fuse","the","long-term","with","recent","items","to","get","long-short","term","purpose"]
code: def reg_loss(self, user_embedding, item_embedding):
      reg_1, reg_2 = self.reg_weight
      loss_1 = reg_1 * torch.norm(
          self.long_w.weight, p=2
      ) + reg_1 * torch.norm(self.long_short_w.weight, p=2)
      loss_2 = reg_2 * torch.norm(
          user_embedding, p=2
      ) + reg_2 * torch.norm(item_embedding, p=2)
  
      return loss_1 + loss_2
  
file_path: RecBole/recbole/model/sequential_recommender/shan.py
imports: import numpy
  import torch
  import torch.nn
  from torch.nn.init import normal_, uniform_
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.loss import BPRLoss
label_desc: Use image node_id 2 for calling the SHAN obj's underlying member method code with example usage: obj.reg_loss(user_embedding, item_embedding) and returns: unknown