code: def forward(self, x_rgb, x_ir, targets):
      centers_rgb, centers_ir = self.get_centers_by_id(
          x_rgb, x_ir, targets
      )
  
      if self.kernel_type == "linear":
          loss = self.linear_mmd(
              centers_rgb, centers_ir
          )  # domain-level loss
  
      elif self.kernel_type == "rbf":
          B = centers_rgb.size(0)
          kernels = self.guassian_kernel(centers_rgb, centers_ir)
  
          XX = kernels[:B, :B]
          YY = kernels[B:, B:]
          XY = kernels[:B, B:]
          YX = kernels[B:, :B]
  
          loss = (XX + YY - XY - YX).mean()
  
      return loss
  
file_path: insightface/recognition/idmmd/losses.py
imports: import torch
  from torch import nn
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the IDMMD obj's underlying member method code with example usage: obj.forward(x_rgb, x_ir, targets) and returns: loss