pytorch.sngan_projection
pytorch.sngan_projection copied to clipboard
bug in fid: normalization
Hi, I found a bug in fid score.
The normalization before inception model is written as: https://github.com/crcrpar/pytorch.sngan_projection/blob/7afdca4a0e4f2df2efbb585133cccb216b348545/models/inception.py#L128-L132
but it should be: https://github.com/mseitzer/pytorch-fid/blob/4e366b2fc9fb933bec9f6f24c5e87c3bd9452eda/inception.py#L130-L131
or it should be fixed like:
if self.normalize_input:
mean = torch.tensor((0.485, 0.456, 0.406)).view(1, 3, 1, 1).cuda()
std = torch.tensor((0.229, 0.224, 0.225)).view(1, 3, 1, 1).cuda()
x = (x - mean) / std
Thank you for your report & suggestion!
I'm sorry for my late response and bothering you by my bad. To be honest, I did not test/use FID scores.
Oh, I did not mean to blame you but just wanted to help your repo and other users. Thanks for your response :)
Oh, I did not mean to blame you but just wanted to help your repo and other users.
Thank you for your kind words.
I added the link to this issue tentatively to clarify what is wrong & how to fix this.