HRNet-Human-Pose-Estimation icon indicating copy to clipboard operation
HRNet-Human-Pose-Estimation copied to clipboard

why is there a 0.5 factor applied to the loss during training?

Open adizhol-str opened this issue 4 months ago • 0 comments

Hello,

Thank you for your contribution. Why is there a 0.5 factor applied to the loss in JointMSELoss? I didn't find any mention of this in the paper. Also, why not use a L1 error?

    for idx in range(num_joints):
        heatmap_pred = heatmaps_pred[idx].squeeze()
        heatmap_gt = heatmaps_gt[idx].squeeze()
        if self.use_target_weight:
            loss += 0.5 * self.criterion(
                heatmap_pred.mul(target_weight[:, idx]),
                heatmap_gt.mul(target_weight[:, idx])
            )
        else:
            loss += 0.5 * self.criterion(heatmap_pred, heatmap_gt)

Thank you

adizhol-str avatar Oct 11 '24 11:10 adizhol-str