code: def loss_fn(self, users, pos_items, neg_items):
      pos_scores = (users * pos_items).sum(1)
      neg_scores = (users * neg_items).sum(1)
  
      bpr_loss = F.softplus(neg_scores - pos_scores).mean()
      reg_loss = (
          (1 / 2)
          * (
              torch.norm(users) ** 2
              + torch.norm(pos_items) ** 2
              + torch.norm(neg_items) ** 2
          )
          / len(users)
      )
  
      return bpr_loss + self.lambda_reg * reg_loss, bpr_loss, reg_loss
  
file_path: cornac/cornac/models/lightgcn/lightgcn.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  import dgl
  import dgl.function
label_desc: Use image node_id 3 for calling the Model obj's underlying member method code with example usage: obj.loss_fn(users, pos_items, neg_items) and returns: unknown,  bpr_loss,  reg_loss