{
  "id": 158504,
  "title": "GPU is not working",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/158504",
  "author_name": "manpreet singh",
  "post_date": "2020-06-14T13:46:14.358000",
  "votes": 0,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I have been using pytorch version to train model but gpu usage is 0.00%.\ni have used 100*100 resize.</p>",
  "messages": [
    {
      "id": 893545,
      "postDate": "2020-06-19T17:53:37.693Z",
      "content": "<p>Hey,</p>\n\n<p>I realized this problem can sometimes occur when the device is not selected. For example in tensorflow, even if we turn on the GPU, to access its potential one has to write </p>\n\n<p>with tf.device(\"/device/GPU:0\") ...something like this. Do check for an equivalent PyTorch statement and wrap your train loop inside it.</p>\n\n<p>Hope this helps,\nCheers </p>",
      "rawMarkdown": "Hey,\n\nI realized this problem can sometimes occur when the device is not selected. For example in tensorflow, even if we turn on the GPU, to access its potential one has to write \n\nwith tf.device(\"/device/GPU:0\") ...something like this. Do check for an equivalent PyTorch statement and wrap your train loop inside it.\n\nHope this helps,\nCheers ",
      "replies": [
        {
          "id": 893885,
          "postDate": "2020-06-20T04:06:06.807Z",
          "content": "<p>yeah i have been doing that, mode.cuda() and images and labels.cuda before training loop.\nbut still GPU meter has been stuck to 0.00% always.</p>",
          "rawMarkdown": "yeah i have been doing that, mode.cuda() and images and labels.cuda before training loop.\nbut still GPU meter has been stuck to 0.00% always."
        }
      ]
    },
    {
      "id": 885859,
      "postDate": "2020-06-14T14:24:11.173Z",
      "content": "<p><a href=\"https://www.kaggle.com/iammanpreet/kernel394ff2dc36/edit\">https://www.kaggle.com/iammanpreet/kernel394ff2dc36/edit</a></p>\n\n<p>see i have done everything cuda needs but my cuda meter is stuck to 0.00 and after a while session stops due to cpu overload.</p>",
      "rawMarkdown": "https://www.kaggle.com/iammanpreet/kernel394ff2dc36/edit\n\nsee i have done everything cuda needs but my cuda meter is stuck to 0.00 and after a while session stops due to cpu overload.",
      "replies": [
        {
          "id": 885899,
          "postDate": "2020-06-14T14:50:40.193Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 885853,
      "postDate": "2020-06-14T14:20:18.340Z",
      "content": "<p>I am not a PyTorch user, but to connect to GPU using PyTorch you need to make some code changes regarding Cuda, Right? have you done that?</p>",
      "rawMarkdown": "I am not a PyTorch user, but to connect to GPU using PyTorch you need to make some code changes regarding Cuda, Right? have you done that?",
      "replies": [
        {
          "id": 893886,
          "postDate": "2020-06-20T04:06:30.077Z",
          "content": "<p>yes sir i have done that.</p>",
          "rawMarkdown": "yes sir i have done that."
        }
      ]
    },
    {
      "id": 885802,
      "postDate": "2020-06-14T13:46:14.360Z",
      "content": "<p>I have been using pytorch version to train model but gpu usage is 0.00%.\ni have used 100*100 resize.</p>",
      "rawMarkdown": "I have been using pytorch version to train model but gpu usage is 0.00%.\ni have used 100*100 resize.\n\n"
    }
  ],
  "comments": [
    {
      "id": 893545,
      "author_name": "Aditya Baurai",
      "author_url": "",
      "post_date": "2020-06-19T17:53:37.693000",
      "content": "<p>Hey,</p>\n\n<p>I realized this problem can sometimes occur when the device is not selected. For example in tensorflow, even if we turn on the GPU, to access its potential one has to write </p>\n\n<p>with tf.device(\"/device/GPU:0\") ...something like this. Do check for an equivalent PyTorch statement and wrap your train loop inside it.</p>\n\n<p>Hope this helps,\nCheers </p>",
      "votes": 0,
      "replies": [
        {
          "id": 893885,
          "author_name": "manpreet singh",
          "author_url": "",
          "post_date": "2020-06-20T04:06:06.807000",
          "content": "<p>yeah i have been doing that, mode.cuda() and images and labels.cuda before training loop.\nbut still GPU meter has been stuck to 0.00% always.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 885859,
      "author_name": "manpreet singh",
      "author_url": "",
      "post_date": "2020-06-14T14:24:11.173000",
      "content": "<p><a href=\"https://www.kaggle.com/iammanpreet/kernel394ff2dc36/edit\">https://www.kaggle.com/iammanpreet/kernel394ff2dc36/edit</a></p>\n\n<p>see i have done everything cuda needs but my cuda meter is stuck to 0.00 and after a while session stops due to cpu overload.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 885899,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-06-14T14:50:40.193000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 885853,
      "author_name": "somuSan",
      "author_url": "",
      "post_date": "2020-06-14T14:20:18.340000",
      "content": "<p>I am not a PyTorch user, but to connect to GPU using PyTorch you need to make some code changes regarding Cuda, Right? have you done that?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 893886,
          "author_name": "manpreet singh",
          "author_url": "",
          "post_date": "2020-06-20T04:06:30.077000",
          "content": "<p>yes sir i have done that.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "893545": "Hey,\n\nI realized this problem can sometimes occur when the device is not selected. For example in tensorflow, even if we turn on the GPU, to access its potential one has to write \n\nwith tf.device(\"/device/GPU:0\") ...something like this. Do check for an equivalent PyTorch statement and wrap your train loop inside it.\n\nHope this helps,\nCheers ",
    "885859": "https://www.kaggle.com/iammanpreet/kernel394ff2dc36/edit\n\nsee i have done everything cuda needs but my cuda meter is stuck to 0.00 and after a while session stops due to cpu overload.",
    "885853": "I am not a PyTorch user, but to connect to GPU using PyTorch you need to make some code changes regarding Cuda, Right? have you done that?",
    "885802": "I have been using pytorch version to train model but gpu usage is 0.00%.\ni have used 100*100 resize.\n\n"
  }
}