docstr: mpjpe: mpjpe loss between 3d joints
  keypoint_2d_loss: 2d joints loss compute by criterion_2dpose
docstr_tok: ["mpjpe",":","mpjpe","loss","between","3d","joints","keypoint_2d_loss",":","2d","joints","loss","compute","by","criterion_2dpose"]
code: def forward(self, pred3d, pred2d, inputs):
      """
      mpjpe: mpjpe loss between 3d joints
      keypoint_2d_loss: 2d joints loss compute by criterion_2dpose
      """
      gt_3d_joints = inputs["joints_3d"]
      gt_2d_joints = inputs["joints_2d"]
      has_3d_joints = inputs["has_3d_joints"]
      has_2d_joints = inputs["has_2d_joints"]
  
      loss_3d = mpjpe_focal(pred3d, gt_3d_joints, has_3d_joints)
      loss = self.weight_3d * loss_3d
      epoch = inputs["epoch_id"]
      if self.weight_2d > 0:
          weight = self.weight_2d * pow(0.1, (epoch // 8))
          if epoch > 8:
              weight = 0
          loss_2d = keypoint_2d_loss(
              self.criterion_2dpose, pred2d, gt_2d_joints, has_2d_joints
          )
          loss += weight * loss_2d
      return loss
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from itertools import cycle, islice
  from collections import abc
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register, serializable
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the Pose3DLoss obj's underlying member method code with example usage: obj.forward(pred3d, pred2d, inputs) and returns: loss