class_docstr: MacridVAE is an item-based collaborative filtering model that learns disentangled representations from user
  behavior and simultaneously ranks all items for each user.
  
  We implement the model following the original author.
class_docstr_tok: ["MacridVAE","is","an","item-based","collaborative","filtering","model","that","learns","disentangled","representations","from","user","behavior","and","simultaneously","ranks","all","items","for","each","user",".","We","implement","the","model","following","the","original","author","."]
docstr: Calculate the L2 normalization loss of model parameters.
  Including embedding matrices and weight matrices of model.
  
  Returns:
      loss(torch.FloatTensor): The L2 Loss tensor. shape of [1,]
docstr_tok: ["Calculate","the","L2","normalization","loss","of","model","parameters",".","Including","embedding","matrices","and","weight","matrices","of","model",".","Returns",":","loss","(","torch.FloatTensor",")",":","The","L2","Loss","tensor",".","shape","of","[","1",",","]"]
code: def reg_loss(self):
      r"""Calculate the L2 normalization loss of model parameters.
      Including embedding matrices and weight matrices of model.
  
      Returns:
          loss(torch.FloatTensor): The L2 Loss tensor. shape of [1,]
      """
      reg_1, reg_2 = self.regs[:2]
      loss_1 = reg_1 * self.item_embedding.weight.norm(2)
      loss_2 = reg_1 * self.k_embedding.weight.norm(2)
      loss_3 = 0
      for name, parm in self.encoder.named_parameters():
          if name.endswith("weight"):
              loss_3 = loss_3 + reg_2 * parm.norm(2)
      return loss_1 + loss_2 + loss_3
  
file_path: RecBole/recbole/model/general_recommender/macridvae.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from recbole.model.abstract_recommender import AutoEncoderMixin, GeneralRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.loss import EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 6 for calling the MacridVAE obj's underlying member method code with example usage: obj.reg_loss() and returns: unknown