code: def guassian_kernel(self, x_rgb, x_ir):
      total = torch.cat([x_rgb, x_ir], dim=0)
      N = total.size(0)
  
      total0 = total.unsqueeze(0).expand(
          int(total.size(0)), int(total.size(0)), int(total.size(1))
      )
      total1 = total.unsqueeze(1).expand(
          int(total.size(0)), int(total.size(0)), int(total.size(1))
      )
      dists = ((total0 - total1) ** 2).sum(2)
  
      if self.fix_sigma:
          bandwidth = self.fix_sigma
      else:
          bandwidth = torch.sum(dists.data) / (N**2 - N)
  
      bandwidth /= self.kernel_mul ** (self.kernel_num // 2)
      bandwidth_list = [
          bandwidth * (self.kernel_mul**i)
          for i in range(self.kernel_num)
      ]
      kernel_val = [
          torch.exp(-dists / bandwidth_temp)
          for bandwidth_temp in bandwidth_list
      ]
      return sum(kernel_val)
  
file_path: insightface/recognition/idmmd/losses.py
imports: import torch
  from torch import nn
  import torch.nn.functional
label_desc: Use image node_id 5 for calling the IDMMD obj's underlying member method code with example usage: obj.guassian_kernel(x_rgb, x_ir) and returns: sum