{
  "id": 99210,
  "title": "Can we benefit from training a classifier?",
  "url": "/competitions/generative-dog-images/discussion/99210",
  "author_name": "",
  "post_date": "2019-07-09T14:50:55.490451600Z",
  "votes": 1,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Since we are given annotations after gently asking organizers for them, we are free to train breeds classifier. Do you think one can benefit from it?\nI see the next usage: use classifier latent space features to optimize FID metrick between train and generated images hoping it will correlate with public and private LB.\nAnd one more thought, you don't even need a separate network for classifier, just can add classification head to Discriminator, which besides should improve D-network training process/stability as some papers and articles state.\nAny thoughts?</p>",
  "messages": [
    {
      "id": "571386",
      "postDate": "07/09/2019 14:50:55",
      "content": "<p>Since we are given annotations after gently asking organizers for them, we are free to train breeds classifier. Do you think one can benefit from it?\nI see the next usage: use classifier latent space features to optimize FID metrick between train and generated images hoping it will correlate with public and private LB.\nAnd one more thought, you don't even need a separate network for classifier, just can add classification head to Discriminator, which besides should improve D-network training process/stability as some papers and articles state.\nAny thoughts?</p>",
      "rawMarkdown": "Since we are given annotations after gently asking organizers for them, we are free to train breeds classifier. Do you think one can benefit from it?\nI see the next usage: use classifier latent space features to optimize FID metrick between train and generated images hoping it will correlate with public and private LB.\nAnd one more thought, you don't even need a separate network for classifier, just can add classification head to Discriminator, which besides should improve D-network training process/stability as some papers and articles state.\nAny thoughts?",
      "votes": null
    },
    {
      "id": "571429",
      "postDate": "07/09/2019 15:26:57",
      "content": "<p>Separate classifier could be used for feature loss (perception loss) implementation. But training it from scratch can take quite a while which shortens the available time for training the GAN itself. Maybe there are other ways. Like taking the features from different layers of discriminator. Especially if it trained using real labels</p>\n\n<p>The other idea I have is to train a few shallow GANs using different subsets of data. You can combine similar dog breeds into one pack which is easier to generalize. I assume it should allow to generate more high quality pics but would hurt diversity a lot.</p>",
      "rawMarkdown": "Separate classifier could be used for feature loss (perception loss) implementation. But training it from scratch can take quite a while which shortens the available time for training the GAN itself. Maybe there are other ways. Like taking the features from different layers of discriminator. Especially if it trained using real labels\n\nThe other idea I have is to train a few shallow GANs using different subsets of data. You can combine similar dog breeds into one pack which is easier to generalize. I assume it should allow to generate more high quality pics but would hurt diversity a lot.",
      "votes": null
    },
    {
      "id": "571437",
      "postDate": "07/09/2019 15:36:08",
      "content": "<p>Yes, it should benefit. There are many papers that suggest this. And its interesting to note that when you're done training, the Discriminator will be a better (stand alone) classifier than if it hadn't participated in competition with the Generator. I list 3 different ways to use class labels <a href=\"https://www.kaggle.com/c/generative-dog-images/discussion/99354#572207\">here</a></p>",
      "rawMarkdown": "Yes, it should benefit. There are many papers that suggest this. And its interesting to note that when you're done training, the Discriminator will be a better (stand alone) classifier than if it hadn't participated in competition with the Generator. I list 3 different ways to use class labels [here][1]\n\n[1]: https://www.kaggle.com/c/generative-dog-images/discussion/99354#572207",
      "votes": null
    },
    {
      "id": "571471",
      "postDate": "07/09/2019 16:14:28",
      "content": "<p>Some interesting papers I've been looking into recently, regarding this topic : \n- Conditional Image Synthesis with Auxiliary Classifier GANs - <a href=\"https://arxiv.org/pdf/1610.09585.pdf\">https://arxiv.org/pdf/1610.09585.pdf</a>\n- Self-Supervised GANs via Auxiliary Rotation Loss - <a href=\"https://arxiv.org/pdf/1811.11212.pdf\">https://arxiv.org/pdf/1811.11212.pdf</a></p>\n\n<p>First one looks a lot like the one that <a href=\"/cdeotte\">@cdeotte</a> shared though.</p>",
      "rawMarkdown": "Some interesting papers I've been looking into recently, regarding this topic : \n- Conditional Image Synthesis with Auxiliary Classifier GANs - https://arxiv.org/pdf/1610.09585.pdf\n- Self-Supervised GANs via Auxiliary Rotation Loss - https://arxiv.org/pdf/1811.11212.pdf\n\nFirst one looks a lot like the one that @cdeotte shared though.",
      "votes": null
    },
    {
      "id": "571472",
      "postDate": "07/09/2019 16:16:54",
      "content": "<p>Ian Goodfellow, the author of GANs, answers this question <a href=\"https://www.quora.com/Can-Generative-Adversarial-networks-use-multi-class-labels\">here</a>. He also links a few papers.</p>",
      "rawMarkdown": "Ian Goodfellow, the author of GANs, answers this question [here][1]. He also links a few papers.\n\n[1]: https://www.quora.com/Can-Generative-Adversarial-networks-use-multi-class-labels",
      "votes": null
    },
    {
      "id": "572124",
      "postDate": "07/10/2019 13:47:58",
      "content": "<p>You could do this. Build a Discriminator as follows <code>Input(3x64x64) -&amp;gt; 128x32x32 -&amp;gt; 256x16x16 -&amp;gt; 512x8x8 -&amp;gt; 1024x4x4 -&amp;gt; FC 2048 -&amp;gt; SoftMax 121</code>. There are 120 breeds and 1 Fake output sigmoid. Next feed Real and Fake images into your Discriminator (separate batches). Update the Discriminator's weights to correctly classify all into 121 labels. Update the Generator's weights by feature matching <code>FC 2048</code> based on the activations from Fake versus Real. This would mimic optimizing for FID.</p>",
      "rawMarkdown": "You could do this. Build a Discriminator as follows `Input(3x64x64) -&gt; 128x32x32 -&gt; 256x16x16 -&gt; 512x8x8 -&gt; 1024x4x4 -&gt; FC 2048 -&gt; SoftMax 121`. There are 120 breeds and 1 Fake output sigmoid. Next feed Real and Fake images into your Discriminator (separate batches). Update the Discriminator's weights to correctly classify all into 121 labels. Update the Generator's weights by feature matching `FC 2048` based on the activations from Fake versus Real. This would mimic optimizing for FID.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 571429,
      "author_name": "dvorobiev",
      "author_url": "",
      "post_date": "07/09/2019 15:26:57",
      "content": "<p>Separate classifier could be used for feature loss (perception loss) implementation. But training it from scratch can take quite a while which shortens the available time for training the GAN itself. Maybe there are other ways. Like taking the features from different layers of discriminator. Especially if it trained using real labels</p>\n\n<p>The other idea I have is to train a few shallow GANs using different subsets of data. You can combine similar dog breeds into one pack which is easier to generalize. I assume it should allow to generate more high quality pics but would hurt diversity a lot.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 571437,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "07/09/2019 15:36:08",
      "content": "<p>Yes, it should benefit. There are many papers that suggest this. And its interesting to note that when you're done training, the Discriminator will be a better (stand alone) classifier than if it hadn't participated in competition with the Generator. I list 3 different ways to use class labels <a href=\"https://www.kaggle.com/c/generative-dog-images/discussion/99354#572207\">here</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 571471,
      "author_name": "theoviel",
      "author_url": "",
      "post_date": "07/09/2019 16:14:28",
      "content": "<p>Some interesting papers I've been looking into recently, regarding this topic : \n- Conditional Image Synthesis with Auxiliary Classifier GANs - <a href=\"https://arxiv.org/pdf/1610.09585.pdf\">https://arxiv.org/pdf/1610.09585.pdf</a>\n- Self-Supervised GANs via Auxiliary Rotation Loss - <a href=\"https://arxiv.org/pdf/1811.11212.pdf\">https://arxiv.org/pdf/1811.11212.pdf</a></p>\n\n<p>First one looks a lot like the one that <a href=\"/cdeotte\">@cdeotte</a> shared though.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 571472,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "07/09/2019 16:16:54",
      "content": "<p>Ian Goodfellow, the author of GANs, answers this question <a href=\"https://www.quora.com/Can-Generative-Adversarial-networks-use-multi-class-labels\">here</a>. He also links a few papers.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 572124,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "07/10/2019 13:47:58",
      "content": "<p>You could do this. Build a Discriminator as follows <code>Input(3x64x64) -&amp;gt; 128x32x32 -&amp;gt; 256x16x16 -&amp;gt; 512x8x8 -&amp;gt; 1024x4x4 -&amp;gt; FC 2048 -&amp;gt; SoftMax 121</code>. There are 120 breeds and 1 Fake output sigmoid. Next feed Real and Fake images into your Discriminator (separate batches). Update the Discriminator's weights to correctly classify all into 121 labels. Update the Generator's weights by feature matching <code>FC 2048</code> based on the activations from Fake versus Real. This would mimic optimizing for FID.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "571386": "Since we are given annotations after gently asking organizers for them, we are free to train breeds classifier. Do you think one can benefit from it?\nI see the next usage: use classifier latent space features to optimize FID metrick between train and generated images hoping it will correlate with public and private LB.\nAnd one more thought, you don't even need a separate network for classifier, just can add classification head to Discriminator, which besides should improve D-network training process/stability as some papers and articles state.\nAny thoughts?",
    "571429": "Separate classifier could be used for feature loss (perception loss) implementation. But training it from scratch can take quite a while which shortens the available time for training the GAN itself. Maybe there are other ways. Like taking the features from different layers of discriminator. Especially if it trained using real labels\n\nThe other idea I have is to train a few shallow GANs using different subsets of data. You can combine similar dog breeds into one pack which is easier to generalize. I assume it should allow to generate more high quality pics but would hurt diversity a lot.",
    "571437": "Yes, it should benefit. There are many papers that suggest this. And its interesting to note that when you're done training, the Discriminator will be a better (stand alone) classifier than if it hadn't participated in competition with the Generator. I list 3 different ways to use class labels [here][1]\n\n[1]: https://www.kaggle.com/c/generative-dog-images/discussion/99354#572207",
    "571471": "Some interesting papers I've been looking into recently, regarding this topic : \n- Conditional Image Synthesis with Auxiliary Classifier GANs - https://arxiv.org/pdf/1610.09585.pdf\n- Self-Supervised GANs via Auxiliary Rotation Loss - https://arxiv.org/pdf/1811.11212.pdf\n\nFirst one looks a lot like the one that @cdeotte shared though.",
    "571472": "Ian Goodfellow, the author of GANs, answers this question [here][1]. He also links a few papers.\n\n[1]: https://www.quora.com/Can-Generative-Adversarial-networks-use-multi-class-labels",
    "572124": "You could do this. Build a Discriminator as follows `Input(3x64x64) -&gt; 128x32x32 -&gt; 256x16x16 -&gt; 512x8x8 -&gt; 1024x4x4 -&gt; FC 2048 -&gt; SoftMax 121`. There are 120 breeds and 1 Fake output sigmoid. Next feed Real and Fake images into your Discriminator (separate batches). Update the Discriminator's weights to correctly classify all into 121 labels. Update the Generator's weights by feature matching `FC 2048` based on the activations from Fake versus Real. This would mimic optimizing for FID."
  },
  "source": "meta"
}