{
  "id": 77469,
  "title": "CUDA Memory Error",
  "url": "/competitions/humpback-whale-identification/discussion/77469",
  "author_name": "",
  "post_date": "2019-01-13T05:03:21.492632700Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Hi I am trying to do this on colab and when I try to train my model it shows cuda out of memory error any thoughts on how to solve this?</p>",
  "messages": [
    {
      "id": "455157",
      "postDate": "01/13/2019 05:03:21",
      "content": "<p>Hi I am trying to do this on colab and when I try to train my model it shows cuda out of memory error any thoughts on how to solve this?</p>",
      "rawMarkdown": "Hi I am trying to do this on colab and when I try to train my model it shows cuda out of memory error any thoughts on how to solve this?",
      "votes": null
    },
    {
      "id": "455168",
      "postDate": "01/13/2019 05:38:15",
      "content": "<p>Just decrease the batch size.</p>",
      "rawMarkdown": "Just decrease the batch size.",
      "votes": null
    },
    {
      "id": "455301",
      "postDate": "01/13/2019 14:45:45",
      "content": "<p>Hey, I am not familiar with colab, but generally you can try the following steps to avoid such errors:</p>\n\n<ul>\n<li>decrease batch size as lafoss already answered</li>\n<li>reduce dimensionality in layers (use larger strides per layers)</li>\n<li>decrease number of layers</li>\n<li>reduce the number convolutional layers and add more pooling layers instead</li>\n</ul>\n\n<p>If this does not help, you can try some other things like:\n* use 16bit floats instead of 32bit floats\n* distribute the network on multiple devices</p>",
      "rawMarkdown": "Hey, I am not familiar with colab, but generally you can try the following steps to avoid such errors:\n\n* decrease batch size as lafoss already answered\n* reduce dimensionality in layers (use larger strides per layers)\n* decrease number of layers\n* reduce the number convolutional layers and add more pooling layers instead\n\nIf this does not help, you can try some other things like:\n* use 16bit floats instead of 32bit floats\n* distribute the network on multiple devices",
      "votes": null
    },
    {
      "id": "583499",
      "postDate": "07/24/2019 14:54:29",
      "content": "<p>It depends. It is reasonable to try decreasing the batch size - it is one of the most common sources of the error.\nIf it is not helpful, whittle down your model.</p>",
      "rawMarkdown": "It depends. It is reasonable to try decreasing the batch size - it is one of the most common sources of the error.\nIf it is not helpful, whittle down your model.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 455168,
      "author_name": "iafoss",
      "author_url": "",
      "post_date": "01/13/2019 05:38:15",
      "content": "<p>Just decrease the batch size.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 455301,
      "author_name": "jeffkk",
      "author_url": "",
      "post_date": "01/13/2019 14:45:45",
      "content": "<p>Hey, I am not familiar with colab, but generally you can try the following steps to avoid such errors:</p>\n\n<ul>\n<li>decrease batch size as lafoss already answered</li>\n<li>reduce dimensionality in layers (use larger strides per layers)</li>\n<li>decrease number of layers</li>\n<li>reduce the number convolutional layers and add more pooling layers instead</li>\n</ul>\n\n<p>If this does not help, you can try some other things like:\n* use 16bit floats instead of 32bit floats\n* distribute the network on multiple devices</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 583499,
      "author_name": "minseokl",
      "author_url": "",
      "post_date": "07/24/2019 14:54:29",
      "content": "<p>It depends. It is reasonable to try decreasing the batch size - it is one of the most common sources of the error.\nIf it is not helpful, whittle down your model.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "455157": "Hi I am trying to do this on colab and when I try to train my model it shows cuda out of memory error any thoughts on how to solve this?",
    "455168": "Just decrease the batch size.",
    "455301": "Hey, I am not familiar with colab, but generally you can try the following steps to avoid such errors:\n\n* decrease batch size as lafoss already answered\n* reduce dimensionality in layers (use larger strides per layers)\n* decrease number of layers\n* reduce the number convolutional layers and add more pooling layers instead\n\nIf this does not help, you can try some other things like:\n* use 16bit floats instead of 32bit floats\n* distribute the network on multiple devices",
    "583499": "It depends. It is reasonable to try decreasing the batch size - it is one of the most common sources of the error.\nIf it is not helpful, whittle down your model."
  },
  "source": "meta"
}