{
  "id": 132158,
  "title": "Anybody doing inference on 224x224 sized images?",
  "url": "/competitions/bengaliai-cv19/discussion/132158",
  "author_name": "",
  "post_date": "2020-02-24T15:32:51.570904300Z",
  "votes": null,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Kaggle returns a 'Notebook Exceeded Allowed Compute' every time I try to infer using 224x224 images. The same kernel goes through if I use a smaller 128x128 image size.\nThe inference kernel is a modified version that Iafoss kindly shared with us. Here's the <a href=\"https://www.kaggle.com/iafoss/grapheme-fast-ai-starter-inference\">link</a>.</p>\n\n<p>Is the RAM the issue?\nWhat changes did you do to get it to work?\nMaybe every so often dump the results into a file and at the end, merge all the files?</p>",
  "messages": [
    {
      "id": "755241",
      "postDate": "02/24/2020 15:32:51",
      "content": "<p>Kaggle returns a 'Notebook Exceeded Allowed Compute' every time I try to infer using 224x224 images. The same kernel goes through if I use a smaller 128x128 image size.\nThe inference kernel is a modified version that Iafoss kindly shared with us. Here's the <a href=\"https://www.kaggle.com/iafoss/grapheme-fast-ai-starter-inference\">link</a>.</p>\n\n<p>Is the RAM the issue?\nWhat changes did you do to get it to work?\nMaybe every so often dump the results into a file and at the end, merge all the files?</p>",
      "rawMarkdown": "Kaggle returns a 'Notebook Exceeded Allowed Compute' every time I try to infer using 224x224 images. The same kernel goes through if I use a smaller 128x128 image size.\nThe inference kernel is a modified version that Iafoss kindly shared with us. Here's the [link](https://www.kaggle.com/iafoss/grapheme-fast-ai-starter-inference).\n\nIs the RAM the issue?\nWhat changes did you do to get it to work?\nMaybe every so often dump the results into a file and at the end, merge all the files?",
      "votes": null
    },
    {
      "id": "755482",
      "postDate": "02/24/2020 20:06:37",
      "content": "<p>Try use a smaller batch size on inference, I am sure it will work</p>",
      "rawMarkdown": "Try use a smaller batch size on inference, I am sure it will work",
      "votes": null
    },
    {
      "id": "755491",
      "postDate": "02/24/2020 20:21:02",
      "content": "<p>Thanks for your reply!\nI even tried with a batch size of 1, didn't work on submit.\nGuess it's something to do with keeping the full parquet <em>and</em> the resized dataframe in memory. I tried to resize on the fly but all my submissions are over, so gotta wait for a few hours to see if it works or not.</p>",
      "rawMarkdown": "Thanks for your reply!\nI even tried with a batch size of 1, didn't work on submit.\nGuess it's something to do with keeping the full parquet _and_ the resized dataframe in memory. I tried to resize on the fly but all my submissions are over, so gotta wait for a few hours to see if it works or not.",
      "votes": null
    },
    {
      "id": "757024",
      "postDate": "02/26/2020 11:07:51",
      "content": "<p><a href=\"/mightyrains\">@mightyrains</a> It is probably a out of memory problem. I encountered it before and calling .astype(np.uint8) on raw numpy arrays during dataloading did the trick</p>",
      "rawMarkdown": "mightyrains It is probably a out of memory problem. I encountered it before and calling .astype(np.uint8) on raw numpy arrays during dataloading did the trick",
      "votes": null
    },
    {
      "id": "757256",
      "postDate": "02/26/2020 15:18:36",
      "content": "<p>Hi, thanks for the reply!\nIt was indeed an out of memory problem. I solved it by dumping the predictions into files every so often and at the end merged everything into the final submission file.</p>",
      "rawMarkdown": "Hi, thanks for the reply!\nIt was indeed an out of memory problem. I solved it by dumping the predictions into files every so often and at the end merged everything into the final submission file.",
      "votes": null
    },
    {
      "id": "759158",
      "postDate": "02/28/2020 16:46:26",
      "content": "<p>Thank you for posting how you solved this issue. I am going to try that. My guess is I am having a memory problem as well.</p>",
      "rawMarkdown": "Thank you for posting how you solved this issue. I am going to try that. My guess is I am having a memory problem as well.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 755482,
      "author_name": "vladvdv",
      "author_url": "",
      "post_date": "02/24/2020 20:06:37",
      "content": "<p>Try use a smaller batch size on inference, I am sure it will work</p>",
      "votes": null,
      "replies": [
        {
          "id": 755491,
          "author_name": "mightyrains",
          "author_url": "",
          "post_date": "02/24/2020 20:21:02",
          "content": "<p>Thanks for your reply!\nI even tried with a batch size of 1, didn't work on submit.\nGuess it's something to do with keeping the full parquet <em>and</em> the resized dataframe in memory. I tried to resize on the fly but all my submissions are over, so gotta wait for a few hours to see if it works or not.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 757024,
      "author_name": "roguekk007",
      "author_url": "",
      "post_date": "02/26/2020 11:07:51",
      "content": "<p><a href=\"/mightyrains\">@mightyrains</a> It is probably a out of memory problem. I encountered it before and calling .astype(np.uint8) on raw numpy arrays during dataloading did the trick</p>",
      "votes": null,
      "replies": [
        {
          "id": 757256,
          "author_name": "mightyrains",
          "author_url": "",
          "post_date": "02/26/2020 15:18:36",
          "content": "<p>Hi, thanks for the reply!\nIt was indeed an out of memory problem. I solved it by dumping the predictions into files every so often and at the end merged everything into the final submission file.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 759158,
          "author_name": "egrimley",
          "author_url": "",
          "post_date": "02/28/2020 16:46:26",
          "content": "<p>Thank you for posting how you solved this issue. I am going to try that. My guess is I am having a memory problem as well.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "755241": "Kaggle returns a 'Notebook Exceeded Allowed Compute' every time I try to infer using 224x224 images. The same kernel goes through if I use a smaller 128x128 image size.\nThe inference kernel is a modified version that Iafoss kindly shared with us. Here's the [link](https://www.kaggle.com/iafoss/grapheme-fast-ai-starter-inference).\n\nIs the RAM the issue?\nWhat changes did you do to get it to work?\nMaybe every so often dump the results into a file and at the end, merge all the files?",
    "755482": "Try use a smaller batch size on inference, I am sure it will work",
    "755491": "Thanks for your reply!\nI even tried with a batch size of 1, didn't work on submit.\nGuess it's something to do with keeping the full parquet _and_ the resized dataframe in memory. I tried to resize on the fly but all my submissions are over, so gotta wait for a few hours to see if it works or not.",
    "757024": "mightyrains It is probably a out of memory problem. I encountered it before and calling .astype(np.uint8) on raw numpy arrays during dataloading did the trick",
    "757256": "Hi, thanks for the reply!\nIt was indeed an out of memory problem. I solved it by dumping the predictions into files every so often and at the end merged everything into the final submission file.",
    "759158": "Thank you for posting how you solved this issue. I am going to try that. My guess is I am having a memory problem as well."
  },
  "source": "meta"
}