{
  "id": 68865,
  "title": "CNN gives same output to all test set images",
  "url": "/competitions/quickdraw-doodle-recognition/discussion/68865",
  "author_name": "André Neves",
  "post_date": "2018-10-18T00:56:32.888000",
  "votes": 0,
  "comment_count": 9,
  "views": 0,
  "content": "<p>Hi my kernel, <a href=\"https://www.kaggle.com/amneves/quick-draw-keras-cnn-model\">here</a>, even though by the plots i make we can see that during training it achieves an accuracy of above 0.6, when it's time to make predictions it gives the same output to all images.</p>\n\n<p>Am i overfitting or underfitting? the plots seem correct, maybe it is the way the data is processed?</p>\n\n<p>If someone does not mind to help and give the kernel a quick look i would appreciate!</p>",
  "messages": [
    {
      "id": 405910,
      "postDate": "2018-10-18T10:11:21.910Z",
      "content": "<p>Hi Andre,</p>\n\n<p>I noticed you are using my functions  <code>df_to_image_array()</code>, <code>image_generator()</code> during training but you are using a different setup when you create the submission file.</p>\n\n<p>I think you miss <code>df['drawing'] = df['drawing'].apply(ast.literal_eval)</code> there. Try to check the images before applying the model.</p>",
      "rawMarkdown": "Hi Andre,\n\nI noticed you are using my functions  ```df_to_image_array()```, ```image_generator()``` during training but you are using a different setup when you create the submission file.\n\nI think you miss ```df['drawing'] = df['drawing'].apply(ast.literal_eval)``` there. Try to check the images before applying the model.\n\n",
      "votes": 2,
      "replies": [
        {
          "id": 405973,
          "postDate": "2018-10-18T12:49:32.453Z",
          "content": "<p>Yes! Also thank you for that generator, i was getting OOM before, i will reference you after i do a sucessfull run, hope you do not mind </p>",
          "rawMarkdown": "Yes! Also thank you for that generator, i was getting OOM before, i will reference you after i do a sucessfull run, hope you do not mind "
        },
        {
          "id": 405979,
          "postDate": "2018-10-18T12:58:15.160Z",
          "content": "<p>Of course I don't mind :) Otherwise I would kept the kernel private</p>",
          "rawMarkdown": "Of course I don't mind :) Otherwise I would kept the kernel private",
          "votes": 2
        },
        {
          "id": 406005,
          "postDate": "2018-10-18T13:37:25.927Z",
          "rawMarkdown": "",
          "votes": 1,
          "isDeleted": true
        },
        {
          "id": 406009,
          "postDate": "2018-10-18T13:38:57.817Z",
          "content": "<p>I figured that much! I started using kaggle this month and while i have experience with python when using real data it's totally different from the small projects i did. The only kernel i did from scratch was a Titanic and Pokemon one. I am learning quite a bit from putting together a kernel using bits and pieces of others! Thank you for your contribution! </p>",
          "rawMarkdown": " I figured that much! I started using kaggle this month and while i have experience with python when using real data it's totally different from the small projects i did. The only kernel i did from scratch was a Titanic and Pokemon one. I am learning quite a bit from putting together a kernel using bits and pieces of others! Thank you for your contribution! "
        },
        {
          "id": 406263,
          "postDate": "2018-10-19T00:22:37.107Z",
          "content": "<p>Now it looks like it gives output that is different, problem is it dropped from 0.0005 to 0.0004! Haha I have no idea what's wrong, debugging now</p>",
          "rawMarkdown": "Now it looks like it gives output that is different, problem is it dropped from 0.0005 to 0.0004! Haha I have no idea what's wrong, debugging now"
        },
        {
          "id": 406266,
          "postDate": "2018-10-19T00:35:45.070Z",
          "content": "<p>I found the problem! You sorted your categories which means, i may be predicting it right BUT, the transfer to words is all messed up all i gotta do is sort the categories!</p>",
          "rawMarkdown": "I found the problem! You sorted your categories which means, i may be predicting it right BUT, the transfer to words is all messed up all i gotta do is sort the categories!"
        },
        {
          "id": 406462,
          "postDate": "2018-10-19T09:44:44.643Z",
          "content": "<p>Yep. Previously I just used os.listdir to get the categories. But that caused some issues running the code on different platforms. Sorting the categories should be reproducible...</p>",
          "rawMarkdown": "Yep. Previously I just used os.listdir to get the categories. But that caused some issues running the code on different platforms. Sorting the categories should be reproducible...",
          "votes": 1
        },
        {
          "id": 406630,
          "postDate": "2018-10-19T14:41:25.503Z",
          "content": "<p>Solved, went up to almost 0.7 as expected</p>",
          "rawMarkdown": "Solved, went up to almost 0.7 as expected",
          "votes": 1
        }
      ]
    },
    {
      "id": 405703,
      "postDate": "2018-10-18T00:56:32.887Z",
      "content": "<p>Hi my kernel, <a href=\"https://www.kaggle.com/amneves/quick-draw-keras-cnn-model\">here</a>, even though by the plots i make we can see that during training it achieves an accuracy of above 0.6, when it's time to make predictions it gives the same output to all images.</p>\n\n<p>Am i overfitting or underfitting? the plots seem correct, maybe it is the way the data is processed?</p>\n\n<p>If someone does not mind to help and give the kernel a quick look i would appreciate!</p>",
      "rawMarkdown": "Hi my kernel, [here][1], even though by the plots i make we can see that during training it achieves an accuracy of above 0.6, when it's time to make predictions it gives the same output to all images.\n\nAm i overfitting or underfitting? the plots seem correct, maybe it is the way the data is processed?\n\nIf someone does not mind to help and give the kernel a quick look i would appreciate!\n\n\n  [1]: https://www.kaggle.com/amneves/quick-draw-keras-cnn-model"
    }
  ],
  "comments": [
    {
      "id": 405910,
      "author_name": "beluga",
      "author_url": "",
      "post_date": "2018-10-18T10:11:21.910000",
      "content": "<p>Hi Andre,</p>\n\n<p>I noticed you are using my functions  <code>df_to_image_array()</code>, <code>image_generator()</code> during training but you are using a different setup when you create the submission file.</p>\n\n<p>I think you miss <code>df['drawing'] = df['drawing'].apply(ast.literal_eval)</code> there. Try to check the images before applying the model.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 405973,
          "author_name": "André Neves",
          "author_url": "",
          "post_date": "2018-10-18T12:49:32.453000",
          "content": "<p>Yes! Also thank you for that generator, i was getting OOM before, i will reference you after i do a sucessfull run, hope you do not mind </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 405979,
          "author_name": "beluga",
          "author_url": "",
          "post_date": "2018-10-18T12:58:15.160000",
          "content": "<p>Of course I don't mind :) Otherwise I would kept the kernel private</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 406005,
          "author_name": "",
          "author_url": "",
          "post_date": "2018-10-18T13:37:25.927000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 406009,
          "author_name": "André Neves",
          "author_url": "",
          "post_date": "2018-10-18T13:38:57.817000",
          "content": "<p>I figured that much! I started using kaggle this month and while i have experience with python when using real data it's totally different from the small projects i did. The only kernel i did from scratch was a Titanic and Pokemon one. I am learning quite a bit from putting together a kernel using bits and pieces of others! Thank you for your contribution! </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 406263,
          "author_name": "André Neves",
          "author_url": "",
          "post_date": "2018-10-19T00:22:37.107000",
          "content": "<p>Now it looks like it gives output that is different, problem is it dropped from 0.0005 to 0.0004! Haha I have no idea what's wrong, debugging now</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 406266,
          "author_name": "André Neves",
          "author_url": "",
          "post_date": "2018-10-19T00:35:45.070000",
          "content": "<p>I found the problem! You sorted your categories which means, i may be predicting it right BUT, the transfer to words is all messed up all i gotta do is sort the categories!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 406462,
          "author_name": "beluga",
          "author_url": "",
          "post_date": "2018-10-19T09:44:44.643000",
          "content": "<p>Yep. Previously I just used os.listdir to get the categories. But that caused some issues running the code on different platforms. Sorting the categories should be reproducible...</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 406630,
          "author_name": "André Neves",
          "author_url": "",
          "post_date": "2018-10-19T14:41:25.503000",
          "content": "<p>Solved, went up to almost 0.7 as expected</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "405910": "Hi Andre,\n\nI noticed you are using my functions  ```df_to_image_array()```, ```image_generator()``` during training but you are using a different setup when you create the submission file.\n\nI think you miss ```df['drawing'] = df['drawing'].apply(ast.literal_eval)``` there. Try to check the images before applying the model.\n\n",
    "405703": "Hi my kernel, [here][1], even though by the plots i make we can see that during training it achieves an accuracy of above 0.6, when it's time to make predictions it gives the same output to all images.\n\nAm i overfitting or underfitting? the plots seem correct, maybe it is the way the data is processed?\n\nIf someone does not mind to help and give the kernel a quick look i would appreciate!\n\n\n  [1]: https://www.kaggle.com/amneves/quick-draw-keras-cnn-model"
  }
}