{
  "id": 124325,
  "title": "Training models on Google Colab...",
  "url": "/competitions/bengaliai-cv19/discussion/124325",
  "author_name": "",
  "post_date": "2020-01-03T12:47:14.019320400Z",
  "votes": 2,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Is there a way to free-up GPU/RAM memory on Colab just like in kaggle kernels, as <em>del</em>  with <em>gc.collect()</em> is not working ?? Anyone else facing similar issues on Colab ?</p>",
  "messages": [
    {
      "id": "709391",
      "postDate": "01/03/2020 12:47:14",
      "content": "<p>Is there a way to free-up GPU/RAM memory on Colab just like in kaggle kernels, as <em>del</em>  with <em>gc.collect()</em> is not working ?? Anyone else facing similar issues on Colab ?</p>",
      "rawMarkdown": "Is there a way to free-up GPU/RAM memory on Colab just like in kaggle kernels, as *del*  with *gc.collect()* is not working ?? Anyone else facing similar issues on Colab ?",
      "votes": null
    },
    {
      "id": "709422",
      "postDate": "01/03/2020 13:50:08",
      "content": "<p>del with gc.collect() works for me...</p>",
      "rawMarkdown": "del with gc.collect() works for me...",
      "votes": null
    },
    {
      "id": "709657",
      "postDate": "01/03/2020 19:23:14",
      "content": "<p><a href=\"/tzoukritzou\">@tzoukritzou</a>  I have found that it doesn't free up that memory completely, as it does on Kaggle kernels.\nYou can verify by running the same code on kaggle and colab to see a difference in memory change !</p>",
      "rawMarkdown": "tzoukritzou  I have found that it doesn't free up that memory completely, as it does on Kaggle kernels.\nYou can verify by running the same code on kaggle and colab to see a difference in memory change !",
      "votes": null
    },
    {
      "id": "711020",
      "postDate": "01/05/2020 15:08:23",
      "content": "<p>Well from my experience, when I use del with gc.collect() my script works while when I don't it crashes</p>",
      "rawMarkdown": "Well from my experience, when I use del with gc.collect() my script works while when I don't it crashes",
      "votes": null
    },
    {
      "id": "711088",
      "postDate": "01/05/2020 17:11:32",
      "content": "<p>Its opposite with me. del without gc.collect() is working fine XD\nThanks for your reply <a href=\"/tzoukritzou\">@tzoukritzou</a> !</p>",
      "rawMarkdown": "Its opposite with me. del without gc.collect() is working fine XD\nThanks for your reply @tzoukritzou !",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 709422,
      "author_name": "tzoukritzou",
      "author_url": "",
      "post_date": "01/03/2020 13:50:08",
      "content": "<p>del with gc.collect() works for me...</p>",
      "votes": null,
      "replies": [
        {
          "id": 709657,
          "author_name": "namanj27",
          "author_url": "",
          "post_date": "01/03/2020 19:23:14",
          "content": "<p><a href=\"/tzoukritzou\">@tzoukritzou</a>  I have found that it doesn't free up that memory completely, as it does on Kaggle kernels.\nYou can verify by running the same code on kaggle and colab to see a difference in memory change !</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 711020,
          "author_name": "tzoukritzou",
          "author_url": "",
          "post_date": "01/05/2020 15:08:23",
          "content": "<p>Well from my experience, when I use del with gc.collect() my script works while when I don't it crashes</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 711088,
          "author_name": "namanj27",
          "author_url": "",
          "post_date": "01/05/2020 17:11:32",
          "content": "<p>Its opposite with me. del without gc.collect() is working fine XD\nThanks for your reply <a href=\"/tzoukritzou\">@tzoukritzou</a> !</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "709391": "Is there a way to free-up GPU/RAM memory on Colab just like in kaggle kernels, as *del*  with *gc.collect()* is not working ?? Anyone else facing similar issues on Colab ?",
    "709422": "del with gc.collect() works for me...",
    "709657": "tzoukritzou  I have found that it doesn't free up that memory completely, as it does on Kaggle kernels.\nYou can verify by running the same code on kaggle and colab to see a difference in memory change !",
    "711020": "Well from my experience, when I use del with gc.collect() my script works while when I don't it crashes",
    "711088": "Its opposite with me. del without gc.collect() is working fine XD\nThanks for your reply @tzoukritzou !"
  },
  "source": "meta"
}