{
  "id": 288192,
  "title": "Memory is not available",
  "url": "/competitions/wikipedia-image-caption/discussion/288192",
  "author_name": "",
  "post_date": "2021-11-17T05:56:40.265779300Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I am facing this issue after loading the dataset and my pretrained models. </p>\n<blockquote>\n  <p>Your Notebook tried to allocate more memory than available. It has been restarted.</p>\n</blockquote>\n<p>I understand the error. But, what should I do here for submission? </p>",
  "messages": [
    {
      "id": "1585150",
      "postDate": "11/17/2021 05:56:40",
      "content": "<p>I am facing this issue after loading the dataset and my pretrained models. </p>\n<blockquote>\n  <p>Your Notebook tried to allocate more memory than available. It has been restarted.</p>\n</blockquote>\n<p>I understand the error. But, what should I do here for submission? </p>",
      "rawMarkdown": "I am facing this issue after loading the dataset and my pretrained models. \n> Your Notebook tried to allocate more memory than available. It has been restarted.\n\nI understand the error. But, what should I do here for submission?",
      "votes": null
    },
    {
      "id": "1585476",
      "postDate": "11/17/2021 09:20:17",
      "content": "<p>Hi Townim,</p>\n<p>without having the code it's hard to help.<br>\nSome ideas to check:</p>\n<ul>\n<li>batch size: reducing the batch size reduces the memory allocation</li>\n<li>The number of model parameters: complex models have 100s million parameters and requires more memory. Use first less complex models to check if you're good with other variables.</li>\n<li>sometimes, the memory is not cleaned automatically. I use for each new <br>\n      torch.cuda.empty_cache() ---&gt; for GPU<br>\n      gc.collect()</li>\n</ul>",
      "rawMarkdown": "Hi Townim,\n\nwithout having the code it's hard to help.\nSome ideas to check:\n- batch size: reducing the batch size reduces the memory allocation\n- The number of model parameters: complex models have 100s million parameters and requires more memory. Use first less complex models to check if you're good with other variables.\n- sometimes, the memory is not cleaned automatically. I use for each new \n          torch.cuda.empty_cache() ---> for GPU\n          gc.collect()",
      "votes": null
    },
    {
      "id": "1585715",
      "postDate": "11/17/2021 13:18:12",
      "content": "<p>Thanks, I will try your suggestions. I think in my case, the models have too many parameters. </p>",
      "rawMarkdown": "Thanks, I will try your suggestions. I think in my case, the models have too many parameters.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1585476,
      "author_name": "zoubairkachri",
      "author_url": "",
      "post_date": "11/17/2021 09:20:17",
      "content": "<p>Hi Townim,</p>\n<p>without having the code it's hard to help.<br>\nSome ideas to check:</p>\n<ul>\n<li>batch size: reducing the batch size reduces the memory allocation</li>\n<li>The number of model parameters: complex models have 100s million parameters and requires more memory. Use first less complex models to check if you're good with other variables.</li>\n<li>sometimes, the memory is not cleaned automatically. I use for each new <br>\n      torch.cuda.empty_cache() ---&gt; for GPU<br>\n      gc.collect()</li>\n</ul>",
      "votes": null,
      "replies": [
        {
          "id": 1585715,
          "author_name": "faisaltfc",
          "author_url": "",
          "post_date": "11/17/2021 13:18:12",
          "content": "<p>Thanks, I will try your suggestions. I think in my case, the models have too many parameters. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1585150": "I am facing this issue after loading the dataset and my pretrained models. \n> Your Notebook tried to allocate more memory than available. It has been restarted.\n\nI understand the error. But, what should I do here for submission?",
    "1585476": "Hi Townim,\n\nwithout having the code it's hard to help.\nSome ideas to check:\n- batch size: reducing the batch size reduces the memory allocation\n- The number of model parameters: complex models have 100s million parameters and requires more memory. Use first less complex models to check if you're good with other variables.\n- sometimes, the memory is not cleaned automatically. I use for each new \n          torch.cuda.empty_cache() ---> for GPU\n          gc.collect()",
    "1585715": "Thanks, I will try your suggestions. I think in my case, the models have too many parameters."
  },
  "source": "meta"
}