WenbinLee / DN4

Pytorch code of "Revisiting Local Descriptor based Image-to-Class Measure for Few-shot Learning", CVPR 2019.
Other
191 stars 43 forks source link

About BN parameters #12

Closed itongworld closed 4 years ago

itongworld commented 4 years ago

In your code I see that you fix the parameters of Batch Normalization after 1 epoch (10000 episodes), but when I remove the constraint (i.e., before training use model.train(), and before val/test use model.eval()), the performance will drop sharply.

Have you observed the same degradation w/o fixing the BN params? and why is that?

WenbinLee commented 4 years ago

Yes, we had observed the same degradation without fixing the BN parameters. This is the reason why we fix the parameters of Batch Normalization after 10000 episodes. We don't know the true reason of this phenomenon yet. We guess BN will affect the generalization performance of models. Actually, the research on BN is very hot recently. Thanks.

itongworld commented 4 years ago

Thanks a lot for your insightful analysis. And do you think other metric-based few-shot classification models, i.e., Protonet, can also benefit from this fixed-parameter setting?

WenbinLee commented 4 years ago

You are welcome. Yes, we had reimplemented Protonet based on the same framework, and we found this setting can gain about 1% performance improvement.