{
  "id": 99305,
  "title": "Training DCGAN",
  "url": "/competitions/generative-dog-images/discussion/99305",
  "author_name": "",
  "post_date": "2019-07-10T08:31:28.991163600Z",
  "votes": 1,
  "comment_count": 7,
  "views": 0,
  "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6c7af8374e4b558eaeffb40df39f4e98%2FScreenshot%20from%202019-07-10%2015-28-51.png?generation=1562747372511356&amp;alt=media\" alt=\"\">\nCan anyone explain why my model losses end up like this? I try changing learning rate and model structure but it doesn't work</p>",
  "messages": [
    {
      "id": "571919",
      "postDate": "07/10/2019 08:31:28",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6c7af8374e4b558eaeffb40df39f4e98%2FScreenshot%20from%202019-07-10%2015-28-51.png?generation=1562747372511356&amp;alt=media\" alt=\"\">\nCan anyone explain why my model losses end up like this? I try changing learning rate and model structure but it doesn't work</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6c7af8374e4b558eaeffb40df39f4e98%2FScreenshot%20from%202019-07-10%2015-28-51.png?generation=1562747372511356&amp;alt=media)\nCan anyone explain why my model losses end up like this? I try changing learning rate and model structure but it doesn't work",
      "votes": null
    },
    {
      "id": "571930",
      "postDate": "07/10/2019 08:43:48",
      "content": "<p>How are you preprocessing your images? And which learning rate are you using?</p>",
      "rawMarkdown": "How are you preprocessing your images? And which learning rate are you using?",
      "votes": null
    },
    {
      "id": "571933",
      "postDate": "07/10/2019 08:45:19",
      "content": "<p><code>\nEPOCH = 0 # play with me\n</code></p>\n\n<p>Do you have this line in your code? Since it's in the title of your chart</p>",
      "rawMarkdown": "```\nEPOCH = 0 # play with me\n```\n\nDo you have this line in your code? Since it's in the title of your chart",
      "votes": null
    },
    {
      "id": "571936",
      "postDate": "07/10/2019 08:53:26",
      "content": "<p>I'm only use plot losses code. I write GAN model by keras on my own<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6078e9335340abf3cd50f61c87561ba4%2FScreenshot%20from%202019-07-10%2015-52-46.png?generation=1562748800973641&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I'm only use plot losses code. I write GAN model by keras on my own![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6078e9335340abf3cd50f61c87561ba4%2FScreenshot%20from%202019-07-10%2015-52-46.png?generation=1562748800973641&amp;alt=media)",
      "votes": null
    },
    {
      "id": "571937",
      "postDate": "07/10/2019 08:54:12",
      "content": "<p>Yeah. I cropped images based on the bounding boxes. I have tried some values of learning rate (0.0001, 0.0005, 0.001...) but it doesn't work</p>",
      "rawMarkdown": "Yeah. I cropped images based on the bounding boxes. I have tried some values of learning rate (0.0001, 0.0005, 0.001...) but it doesn't work",
      "votes": null
    },
    {
      "id": "573452",
      "postDate": "07/12/2019 09:50:23",
      "content": "<p>Have you solved your issues? It seems like your model is not learning anything. The problems could be many, I would start by comparing the results obtained from your generator with the original images. For instance, if your generator outputs images in the range 0-1 and your original images have values ranging from -1 to 1, that could explain why the discriminator is completely successful in guessing the fake images produced by the generator and no learning happens.</p>",
      "rawMarkdown": "Have you solved your issues? It seems like your model is not learning anything. The problems could be many, I would start by comparing the results obtained from your generator with the original images. For instance, if your generator outputs images in the range 0-1 and your original images have values ranging from -1 to 1, that could explain why the discriminator is completely successful in guessing the fake images produced by the generator and no learning happens.",
      "votes": null
    },
    {
      "id": "576766",
      "postDate": "07/16/2019 01:29:15",
      "content": "<p>Yeah. I solved it by smoothing real labels (randomly choose real labels from 0.7 to 1.2 based on a normal distribution). Sorry for my poor English</p>",
      "rawMarkdown": "Yeah. I solved it by smoothing real labels (randomly choose real labels from 0.7 to 1.2 based on a normal distribution). Sorry for my poor English",
      "votes": null
    },
    {
      "id": "583721",
      "postDate": "07/24/2019 21:56:34",
      "content": "<p>I was also having a similar problem, I solved it by reducing the batch size, try using batch size equal to or less than 32. If you use large batch size then the discriminator gets a lot of examples to train on and then when the generator is trained then the discriminator is able to give very accurate predictions, so the generator error is very low and the GAN can not train properly.</p>",
      "rawMarkdown": "I was also having a similar problem, I solved it by reducing the batch size, try using batch size equal to or less than 32. If you use large batch size then the discriminator gets a lot of examples to train on and then when the generator is trained then the discriminator is able to give very accurate predictions, so the generator error is very low and the GAN can not train properly.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 571930,
      "author_name": "enric1296",
      "author_url": "",
      "post_date": "07/10/2019 08:43:48",
      "content": "<p>How are you preprocessing your images? And which learning rate are you using?</p>",
      "votes": null,
      "replies": [
        {
          "id": 571937,
          "author_name": "megamind1998",
          "author_url": "",
          "post_date": "07/10/2019 08:54:12",
          "content": "<p>Yeah. I cropped images based on the bounding boxes. I have tried some values of learning rate (0.0001, 0.0005, 0.001...) but it doesn't work</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 571933,
      "author_name": "dvorobiev",
      "author_url": "",
      "post_date": "07/10/2019 08:45:19",
      "content": "<p><code>\nEPOCH = 0 # play with me\n</code></p>\n\n<p>Do you have this line in your code? Since it's in the title of your chart</p>",
      "votes": null,
      "replies": [
        {
          "id": 571936,
          "author_name": "megamind1998",
          "author_url": "",
          "post_date": "07/10/2019 08:53:26",
          "content": "<p>I'm only use plot losses code. I write GAN model by keras on my own<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6078e9335340abf3cd50f61c87561ba4%2FScreenshot%20from%202019-07-10%2015-52-46.png?generation=1562748800973641&amp;alt=media\" alt=\"\"></p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 573452,
      "author_name": "lucamassaron",
      "author_url": "",
      "post_date": "07/12/2019 09:50:23",
      "content": "<p>Have you solved your issues? It seems like your model is not learning anything. The problems could be many, I would start by comparing the results obtained from your generator with the original images. For instance, if your generator outputs images in the range 0-1 and your original images have values ranging from -1 to 1, that could explain why the discriminator is completely successful in guessing the fake images produced by the generator and no learning happens.</p>",
      "votes": null,
      "replies": [
        {
          "id": 576766,
          "author_name": "megamind1998",
          "author_url": "",
          "post_date": "07/16/2019 01:29:15",
          "content": "<p>Yeah. I solved it by smoothing real labels (randomly choose real labels from 0.7 to 1.2 based on a normal distribution). Sorry for my poor English</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 583721,
      "author_name": "techytushar",
      "author_url": "",
      "post_date": "07/24/2019 21:56:34",
      "content": "<p>I was also having a similar problem, I solved it by reducing the batch size, try using batch size equal to or less than 32. If you use large batch size then the discriminator gets a lot of examples to train on and then when the generator is trained then the discriminator is able to give very accurate predictions, so the generator error is very low and the GAN can not train properly.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "571919": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6c7af8374e4b558eaeffb40df39f4e98%2FScreenshot%20from%202019-07-10%2015-28-51.png?generation=1562747372511356&amp;alt=media)\nCan anyone explain why my model losses end up like this? I try changing learning rate and model structure but it doesn't work",
    "571930": "How are you preprocessing your images? And which learning rate are you using?",
    "571933": "```\nEPOCH = 0 # play with me\n```\n\nDo you have this line in your code? Since it's in the title of your chart",
    "571936": "I'm only use plot losses code. I write GAN model by keras on my own![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1584313%2F6078e9335340abf3cd50f61c87561ba4%2FScreenshot%20from%202019-07-10%2015-52-46.png?generation=1562748800973641&amp;alt=media)",
    "571937": "Yeah. I cropped images based on the bounding boxes. I have tried some values of learning rate (0.0001, 0.0005, 0.001...) but it doesn't work",
    "573452": "Have you solved your issues? It seems like your model is not learning anything. The problems could be many, I would start by comparing the results obtained from your generator with the original images. For instance, if your generator outputs images in the range 0-1 and your original images have values ranging from -1 to 1, that could explain why the discriminator is completely successful in guessing the fake images produced by the generator and no learning happens.",
    "576766": "Yeah. I solved it by smoothing real labels (randomly choose real labels from 0.7 to 1.2 based on a normal distribution). Sorry for my poor English",
    "583721": "I was also having a similar problem, I solved it by reducing the batch size, try using batch size equal to or less than 32. If you use large batch size then the discriminator gets a lot of examples to train on and then when the generator is trained then the discriminator is able to give very accurate predictions, so the generator error is very low and the GAN can not train properly."
  },
  "source": "meta"
}