code: def loss_3d(pred3d, gt3d):
      # pred3d, gt_3d = pred3d[..., :3], gt3d[..., :3]
      # bones_pred = (pred3d - pred3d[:, parents])[:, bone_indices]
      # bones_gt = (gt3d - gt3d[:, parents])[:, bone_indices]
      # loss_loc = (torch.abs(pred3d - gt3d)).sum(dim=-1).sqrt().mean()
      # loss_bone = (torch.abs(bones_pred - bones_gt)).sum(dim=-1).sqrt().mean()
      # return loss_loc + loss_bone
      # return torch.sum(torch.abs(pred3d[..., :3] - gt3d[..., :3]), dim=-1).mean()
      return (
          torch.sum((pred3d[..., :3] - gt3d[..., :3]) ** 2, dim=-1)
          .sqrt()
          .mean()
      )
  
file_path: insightface/body/human_pose/ambiguity_aware/lib/core/loss.py
imports: import torch
  from torch.nn import functional
  import numpy
  import torch.nn
  import math
label_desc: Use image node_id 3 for calling a global function with example usage: loss_3d(pred3d, gt3d) and returns: torch