FreezeD icon indicating copy to clipboard operation
FreezeD copied to clipboard

you should change inception model to evaluation mode before calculating FID score

Open jychoi118 opened this issue 4 years ago • 4 comments

You should change inception model to evaluation mode before calculating FID score. Inception model contains batch normalization, whose training and evaluation behaviors are different.

For example, you should add "inception.eval()" below line 486 of stylegan/finetune.py

With this correction, I got significantly different FID score comparing to reports from your paper.

jychoi118 avatar Apr 06 '20 07:04 jychoi118

Hi, thank you for noticing that! I completely forgot about this issue.

By the way, while correcting the mode may degrade the absolute FID scores of both fine-tuning and FreezeD, I guess the relative order would remain. Can you report your values if my guess is wrong?

sangwoomo avatar Apr 06 '20 07:04 sangwoomo

Yes, relative order remains the same.

I'm sorry to tell you that I lost my values with your experiment setting. I will report after I experiment with your setting again. However, I'm currently experimenting with StyleGAN-V2 and AFHQ dataset (500 dog test set) from stargan-v2 with your FreezeD method. I got FID score of 49.3 without eval(), and 98.1 with eval(). Probably StyleGAN-V1 will get about twice FID scores too.

And, thank you for your nice research!

jychoi118 avatar Apr 06 '20 08:04 jychoi118

Happy to hear that the relative orders are the same! Hope you to develop a better method and report updated values in your manuscript :)

sangwoomo avatar Apr 06 '20 08:04 sangwoomo

Yes, relative order remains the same.

I'm sorry to tell you that I lost my values with your experiment setting. I will report after I experiment with your setting again. However, I'm currently experimenting with StyleGAN-V2 and AFHQ dataset (500 dog test set) from stargan-v2 with your FreezeD method. I got FID score of 49.3 without eval(), and 98.1 with eval(). Probably StyleGAN-V1 will get about twice FID scores too.

And, thank you for your nice research!

Hi, do you mean FID score of 49.3 with eval() and 98.1 with train() mode?

Hsintien-Ng avatar Mar 22 '21 14:03 Hsintien-Ng