{
  "id": 154524,
  "title": "GPU is not getting used",
  "url": "/competitions/global-wheat-detection/discussion/154524",
  "author_name": "",
  "post_date": "2020-05-28T18:34:16.326720100Z",
  "votes": 2,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I tried various ways but still, GPU is not getting used, but CPU is used More than 100% and RAM gets full and the process is killed. \n1. How can I fix this issue? \n2. Is it okay if I train the model in my local system and only do the prediction in Kaggle? </p>",
  "messages": [
    {
      "id": "865620",
      "postDate": "05/28/2020 18:34:16",
      "content": "<p>I tried various ways but still, GPU is not getting used, but CPU is used More than 100% and RAM gets full and the process is killed. \n1. How can I fix this issue? \n2. Is it okay if I train the model in my local system and only do the prediction in Kaggle? </p>",
      "rawMarkdown": "I tried various ways but still, GPU is not getting used, but CPU is used More than 100% and RAM gets full and the process is killed. \n1. How can I fix this issue? \n2. Is it okay if I train the model in my local system and only do the prediction in Kaggle?",
      "votes": null
    },
    {
      "id": "865730",
      "postDate": "05/28/2020 21:04:29",
      "content": "<ol>\n<li>For the GPU part maybe you have an issue in your code. For the RAM issue,  a possible way to deal with that is to reduce the number of batches or/and reduce the size of images.</li>\n<li>Yes it is totally okay to train your model in your local system and make your predictions on kaggle. </li>\n</ol>\n\n<p>Good Luck!</p>",
      "rawMarkdown": "1. For the GPU part maybe you have an issue in your code. For the RAM issue,  a possible way to deal with that is to reduce the number of batches or/and reduce the size of images.\n2. Yes it is totally okay to train your model in your local system and make your predictions on kaggle. \n\nGood Luck!",
      "votes": null
    },
    {
      "id": "927508",
      "postDate": "07/13/2020 12:50:01",
      "content": "<p>I have the same thing. I thought I activated the GPU using </p>\n\n<p>os.environ['CUDA_VISIBLE_DEVICES'] = '0'</p>\n\n<p>The memory shows it is using all but percentage is at 0%. Is that a bug?</p>",
      "rawMarkdown": "I have the same thing. I thought I activated the GPU using \n\nos.environ['CUDA_VISIBLE_DEVICES'] = '0'\n\nThe memory shows it is using all but percentage is at 0%. Is that a bug?",
      "votes": null
    },
    {
      "id": "927558",
      "postDate": "07/13/2020 13:33:53",
      "content": "<p>I also have the same issue. I haven't figured out any solutions yet. However, I am following this post. Just in case any solution comes up. Thanks.. </p>",
      "rawMarkdown": "I also have the same issue. I haven't figured out any solutions yet. However, I am following this post. Just in case any solution comes up. Thanks..",
      "votes": null
    },
    {
      "id": "929539",
      "postDate": "07/14/2020 18:29:04",
      "content": "<p>For Ram you should reduce your batchsize.</p>",
      "rawMarkdown": "For Ram you should reduce your batchsize.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 865730,
      "author_name": "ffares",
      "author_url": "",
      "post_date": "05/28/2020 21:04:29",
      "content": "<ol>\n<li>For the GPU part maybe you have an issue in your code. For the RAM issue,  a possible way to deal with that is to reduce the number of batches or/and reduce the size of images.</li>\n<li>Yes it is totally okay to train your model in your local system and make your predictions on kaggle. </li>\n</ol>\n\n<p>Good Luck!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 927508,
      "author_name": "luisvivas",
      "author_url": "",
      "post_date": "07/13/2020 12:50:01",
      "content": "<p>I have the same thing. I thought I activated the GPU using </p>\n\n<p>os.environ['CUDA_VISIBLE_DEVICES'] = '0'</p>\n\n<p>The memory shows it is using all but percentage is at 0%. Is that a bug?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 927558,
      "author_name": "redwankarimsony",
      "author_url": "",
      "post_date": "07/13/2020 13:33:53",
      "content": "<p>I also have the same issue. I haven't figured out any solutions yet. However, I am following this post. Just in case any solution comes up. Thanks.. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 929539,
      "author_name": "riyajm",
      "author_url": "",
      "post_date": "07/14/2020 18:29:04",
      "content": "<p>For Ram you should reduce your batchsize.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "865620": "I tried various ways but still, GPU is not getting used, but CPU is used More than 100% and RAM gets full and the process is killed. \n1. How can I fix this issue? \n2. Is it okay if I train the model in my local system and only do the prediction in Kaggle?",
    "865730": "1. For the GPU part maybe you have an issue in your code. For the RAM issue,  a possible way to deal with that is to reduce the number of batches or/and reduce the size of images.\n2. Yes it is totally okay to train your model in your local system and make your predictions on kaggle. \n\nGood Luck!",
    "927508": "I have the same thing. I thought I activated the GPU using \n\nos.environ['CUDA_VISIBLE_DEVICES'] = '0'\n\nThe memory shows it is using all but percentage is at 0%. Is that a bug?",
    "927558": "I also have the same issue. I haven't figured out any solutions yet. However, I am following this post. Just in case any solution comes up. Thanks..",
    "929539": "For Ram you should reduce your batchsize."
  },
  "source": "meta"
}