code: def ort_loss(x, y):
      loss = torch.abs((x * y).sum(dim=1)).sum()
      loss = loss / float(x.size(0))
      return loss
  
file_path: insightface/recognition/idmmd/utils.py
imports: import os
  import numpy
  import torch
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: ort_loss(x, y) and returns: loss