question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why choose num_classes=1008 when creating the model?

See original GitHub issue

Hello,

Is there a special reason as to why you choose num_classes=1008 instead of using the default value 1000 when creating the model. Refer to: https://github.com/mseitzer/pytorch-fid/blob/master/pytorch_fid/inception.py#L193

Best, Jan

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
FyreMaelcommented, Sep 15, 2020

(1) It turns out that the 1008 size softmax output is an artifact of dimension back-compatibility with a older, Google-internal system. Newer versions of the inception model have 1001 output classes, where one is an “other” class used in training. You shouldn’t need to pay any attention to the extra 8 outputs.

https://github.com/tensorflow/tensorflow/issues/4128#issuecomment-244142481

0reactions
mseitzercommented, Sep 22, 2020

The original Inception score (https://github.com/openai/improved-gan/) uses the same network (weights) as we use here. On top of that, apparently the original Inception score uses all 1008 classes to compute the score: https://github.com/openai/improved-gan/issues/29. This is a bug.

However, if you want to stay compatible to Inception scores reported earlier, you also need to take this bug into account in your implementation. If you just want to compare different models where you compute the score for all of them yourself, you could consider implementing a slightly improved version of Inception score: https://arxiv.org/pdf/1801.01973.pdf.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found