leeyegy / SimCC

[ECCV'2022 Oral] PyTorch implementation for: SimCC: a Simple Coordinate Classification Perspective for Human Pose Estimation (http://arxiv.org/abs/2107.03332). Old name: SimDR
317 stars 29 forks source link

Before calculate loss, why apply softmax in validate_simdr but not in train_simdr? #13

Closed shizidushu closed 2 years ago

shizidushu commented 2 years ago

Why apply softmax in validate_simdr: https://github.com/leeyegy/SimDR/blob/67216117f08d2ccfb65324859758aa007976831a/lib/core/function.py#L324-L328

And not apply softmax in train_simdr? https://github.com/leeyegy/SimDR/blob/67216117f08d2ccfb65324859758aa007976831a/lib/core/function.py#L249-L255

I guess softmax operation is not needed in the validate phase? As there is an LogSoftmax operation to the output when calculating loss.

leeyegy commented 2 years ago

Thanks for your attention. When training, as the same as typical classification task, softmax operation is actually in loss function. When validating, softmax is used to generate a probability distribution, which is useful for the following operations (e.g., for the visible threshold).