princeton-vl / pytorch_stacked_hourglass

Pytorch implementation of the ECCV 2016 paper "Stacked Hourglass Networks for Human Pose Estimation"
BSD 3-Clause "New" or "Revised" License
465 stars 94 forks source link

Transfer learning : accuracy decreases in eval mode #34

Closed jplumail closed 2 years ago

jplumail commented 3 years ago

Hi, thanks for maintaining this project !

I had some problem when doing transfer learning with the pretrained 2 Hourglass model on another dataset (not related to human pose problem but quite close). I experienced some problems in eval mode on my validation and my training set. When I set track_running_mean=False in Batchnorm layers, everything works fine. I tried to change the momentum, change the batch size but it doesn't solve the problem.

Have you ever experienced something like that with Stacked Hourglass ?

Thanks !

crockwell commented 3 years ago

Hmm... Batchnorm can be tricky. I haven't personally run into this error on Hourglass so unfortunately I can't help you much. Because normalization performs differently on train vs. test, I can imagine transfer learning being especially difficult... One thing I can think of is to be extra careful if beginning from a pretrained model! Sorry I can't be of more help.