class_docstr: ENMF is an efficient non-sampling model for general recommendation.
  In order to run non-sampling model, please set the neg_sampling parameter as None .
class_docstr_tok: ["ENMF","is","an","efficient","non-sampling","model","for","general","recommendation",".","In","order","to","run","non-sampling","model",",","please","set","the","neg_sampling","parameter","as","None","."]
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
  
      """
      l2_reg = self.user_embedding.weight.norm(
          2
      ) + self.item_embedding.weight.norm(2)
      loss_l2 = self.reg_weight * l2_reg
  
      return loss_l2
  
file_path: RecBole/recbole/model/general_recommender/enmf.py
imports: import torch
  import torch.nn
  from recbole.model.init import xavier_normal_initialization
  from recbole.utils import InputType
  from recbole.model.abstract_recommender import GeneralRecommender
label_desc: Use image node_id 2 for calling the ENMF obj's underlying member method code with example usage: obj.reg_loss() and returns: loss_l2