lixiny / bihand

✌🏻 BiHand: Recovering Hand Mesh with Multi-stage Bisected Hourglass Networks [BMVC 2020]
GNU General Public License v3.0
97 stars 16 forks source link

a little bug #3

Closed MengHao666 closed 3 years ago

MengHao666 commented 3 years ago

https://github.com/lixiny/bihand/blob/a6f1b9a54dbd95c25d226b286e0956fa6f2cea77/bihand/utils/eval/evalutils.py#L24

First thanks for work. I think there is a small bug when updating losses with this line. I think it should not be *self.sum += val n but self.sum += val** , as the loss is not the mean but the sum of mini-batch. Is that true?Hope for generous reply.

Hao

lixiny commented 3 years ago

Hi Hao,

Thanks for your kindly notification. It is equal to set n=1. at [here].(https://github.com/lixiny/bihand/blob/a6f1b9a54dbd95c25d226b286e0956fa6f2cea77/bihand/utils/eval/evalutils.py#L22) Whether the loss is the sum or mean of the mini-batch depends on the "reduction" in torch function. I will keep in mind later.

MengHao666 commented 3 years ago

It seems okay as long as the weight of different loss terms is well setted.And the "loss update" here is merely for visualization.