sbarratt/inception-score-pytorch

Inception score for conditional GANs

mathfinder opened this issue · 3 comments

IMO,there are tow ways to calculate Inception score of conditional GANs.

  1. For every "condition", calculate a IS and Average them.
  2. Sample "condition" from "real condition distribution" and generate fake data to calculate IS.

Which way is reasonable.
thx.

I'd say either, depending on what fits your application the best.

Also, see http://arxiv.org/abs/1801.01973

thx, @sbarratt
I've read your code and paper. There is a problem.
I just run the code on CIFAR-10(splits:10), and get IS:6.1999668740385081/0.092341845425796432. But your paper report IS:9.737±0.148.

IMO, it is because code line 37:
inception_model = inception_v3(pretrained=True, transform_input=True).type(dtype)
sets transform_input=True. It's function is transforming mean=[0.485, 0.456, 0.406] and std=[0.229, 0.224, 0.225] to mean=[0.5, 0.5, 0.5] and std=[0.5, 0.5, 0.5].It is not correct, since line 84 has normalize numerical value to mean=0.5, std=0.5.

I set line 37 transform_input=False, and got IS: 9.3701126926910518/0.14960956431793704 closer to the paper.

You are correct, change reflected in 3bcf441.