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

One question about AELoss

Open FightStone opened this issue 5 years ago • 3 comments

Thanks for releasing the source code.
When i notice that in push aeloss, it subtracts a human ID number (num_tags), like this (82 rows in loss.py file): if self.loss_type == 'exp': diff = torch.pow(diff, 2) push = torch.exp(-diff) push = torch.sum(push) - num_tags What is the reason for this? Looking forward for your reply, thank you.

FightStone avatar Nov 27 '19 03:11 FightStone

the pull and push loss really make me confued, they are brought from AE?

738654805 avatar Nov 28 '19 09:11 738654805

Our AE loss is exactly the same as https://github.com/princeton-vl/pose-ae-train/tree/master/extensions/AE, except we implemented it in python.

bowenc0221 avatar Nov 29 '19 04:11 bowenc0221

@FightStone after the step : push = torch.exp(-diff) the diagonal of the matrix all becomes one (exp(0) = 1 ), as on the diagonal we are subtracting the same tags. So when we add all the elements of the push matrix we need to remove numtags because that is exactly the number of elements on the diagonal then we get the actual loss value which is the sum of elements off-diagonal.

sathvikask0 avatar May 21 '21 19:05 sathvikask0