JimmySuen / integral-human-pose

Integral Human Pose Regression
MIT License
471 stars 76 forks source link

Typo in pytorch_projects.common_pytorch.common_loss.integral.py #37

Closed BriFuture closed 4 years ago

BriFuture commented 4 years ago

accu_y is summed at dim 3, is it a typo?

    accu_x = heatmaps.sum(dim=2)
    accu_x = accu_x.sum(dim=2)
    accu_y = heatmaps.sum(dim=2)
    accu_y = accu_y.sum(dim=3)
    accu_z = heatmaps.sum(dim=3)
    accu_z = accu_z.sum(dim=3)

https://github.com/JimmySuen/integral-human-pose/blob/ad3f875bc05538da3471ef81484e23fad3e9c787/pytorch_projects/common_pytorch/common_loss/integral.py#L13

lck1201 commented 4 years ago

accu_y = heatmaps.sum(dim=2) accu_y = accu_y.sum(dim=3) 这两行请连在一起看

BriFuture commented 4 years ago

哦我理解了,谢谢 accu_y 是 sum(z, x),所以两个 dim 不同, 而 accu_x 是 sum(z, y) ; accu_z 是 sum(y, x),所以两个 dim 可以是相同的