class_docstr: PNN calculate inner and outer product of feature embedding.
  You can choose the product option with the parameter of use_inner and use_outer
class_docstr_tok: ["PNN","calculate","inner","and","outer","product","of","feature","embedding",".","You","can","choose","the","product","option","with","the","parameter","of","use_inner","and","use_outer"]
docstr: Calculate the L2 normalization loss of model parameters.
  Including weight matrices of mlp layers.
  
  Returns:
      loss(torch.FloatTensor): The L2 Loss tensor. shape of [1,]
docstr_tok: ["Calculate","the","L2","normalization","loss","of","model","parameters",".","Including","weight","matrices","of","mlp","layers",".","Returns",":","loss","(","torch.FloatTensor",")",":","The","L2","Loss","tensor",".","shape","of","[","1",",","]"]
code: def reg_loss(self):
      """Calculate the L2 normalization loss of model parameters.
      Including weight matrices of mlp layers.
  
      Returns:
          loss(torch.FloatTensor): The L2 Loss tensor. shape of [1,]
      """
      reg_loss = 0
      for name, parm in self.mlp_layers.named_parameters():
          if name.endswith("weight"):
              reg_loss = reg_loss + self.reg_weight * parm.norm(2)
      return reg_loss
  
imports: import torch
  import torch.nn
  from torch.nn.init import xavier_normal_, constant_
  from recbole.model.abstract_recommender import ContextRecommender
  from recbole.model.layers import MLPLayers
label_desc: Use image node_id 2 for calling the PNN obj's underlying member method code with example usage: obj.reg_loss() and returns: reg_loss