class_docstr: NAIS is an attention network, which is capable of distinguishing which historical items
  in a user profile are more important for a prediction. We just implement the model following
  the original author with a pointwise training mode.
  
  Note:
      instead of forming a minibatch as all training instances of a randomly sampled user which is
      mentioned in the original paper, we still train the model by a randomly sampled interactions.
docstr: calculate the reg loss for embedding layers and mlp layers
  
  Returns:
      torch.Tensor: reg loss
docstr_tok: ["calculate","the","reg","loss","for","embedding","layers","and","mlp","layers","Returns",":","torch.Tensor",":","reg","loss"]
code: def reg_loss(self):
      """calculate the reg loss for embedding layers and mlp layers
  
      Returns:
          torch.Tensor: reg loss
  
      """
      reg_1, reg_2, reg_3 = self.reg_weights
      loss_1 = reg_1 * self.item_src_embedding.weight.norm(2)
      loss_2 = reg_2 * self.item_dst_embedding.weight.norm(2)
      loss_3 = 0
      for name, parm in self.mlp_layers.named_parameters():
          if name.endswith("weight"):
              loss_3 = loss_3 + reg_3 * parm.norm(2)
      return loss_1 + loss_2 + loss_3
  
imports: import torch
  import torch.nn
  from torch.nn.init import constant_, normal_, xavier_normal_
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.layers import MLPLayers
  from recbole.utils import InputType
label_desc: Use image node_id 5 for calling the NAIS obj's underlying member method code with example usage: obj.reg_loss() and returns: unknown