Skip to content

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

@adizhol-str

Description

@adizhol-str

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions