{
  "id": 207188,
  "title": "Efficiency and out-of-memory issues",
  "url": "/competitions/ranzcr-clip-catheter-line-classification/discussion/207188",
  "author_name": "",
  "post_date": "2020-12-28T15:34:23.690217100Z",
  "votes": null,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hello friends,<br>\nI am trying to run training on entire dataset with EfficientNet-B7. Started with 600x600 image size, then reduced to 150. I still get memory issues while running with GPU on Kaggle or my local. My local machine has 8GB GPU.</p>\n<p>I am using TF-Hub EfficientNet-B7 feature extractor model. I made trainable false and has just one FC layer to do classification.</p>\n<p>I wanted to know how to avoid this running out of memory. I tried reducing batch size from 64 to 32 to 16. It gets delayed but runs out of memory anyway.</p>\n<p>Should I use lite version of the model? I am using cache as well for dataset. Any pointers would be helpful including if PyTorch helps here.</p>\n<p>Thank you.</p>",
  "messages": [
    {
      "id": "1129851",
      "postDate": "12/28/2020 15:34:23",
      "content": "<p>Hello friends,<br>\nI am trying to run training on entire dataset with EfficientNet-B7. Started with 600x600 image size, then reduced to 150. I still get memory issues while running with GPU on Kaggle or my local. My local machine has 8GB GPU.</p>\n<p>I am using TF-Hub EfficientNet-B7 feature extractor model. I made trainable false and has just one FC layer to do classification.</p>\n<p>I wanted to know how to avoid this running out of memory. I tried reducing batch size from 64 to 32 to 16. It gets delayed but runs out of memory anyway.</p>\n<p>Should I use lite version of the model? I am using cache as well for dataset. Any pointers would be helpful including if PyTorch helps here.</p>\n<p>Thank you.</p>",
      "rawMarkdown": "Hello friends,\nI am trying to run training on entire dataset with EfficientNet-B7. Started with 600x600 image size, then reduced to 150. I still get memory issues while running with GPU on Kaggle or my local. My local machine has 8GB GPU.\n\nI am using TF-Hub EfficientNet-B7 feature extractor model. I made trainable false and has just one FC layer to do classification.\n\nI wanted to know how to avoid this running out of memory. I tried reducing batch size from 64 to 32 to 16. It gets delayed but runs out of memory anyway.\n\nShould I use lite version of the model? I am using cache as well for dataset. Any pointers would be helpful including if PyTorch helps here.\n\nThank you.",
      "votes": null
    },
    {
      "id": "1130021",
      "postDate": "12/28/2020 17:49:37",
      "content": "<p>Have you tried loading any B0-B6 models? It could be that B7 just does not fit in your 8GB GPU, no matter what batch size it is. Try loading with bsize of 1 to confirm. if it works - increase it incrementally</p>",
      "rawMarkdown": "Have you tried loading any B0-B6 models? It could be that B7 just does not fit in your 8GB GPU, no matter what batch size it is. Try loading with bsize of 1 to confirm. if it works - increase it incrementally",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1130021,
      "author_name": "raddar",
      "author_url": "",
      "post_date": "12/28/2020 17:49:37",
      "content": "<p>Have you tried loading any B0-B6 models? It could be that B7 just does not fit in your 8GB GPU, no matter what batch size it is. Try loading with bsize of 1 to confirm. if it works - increase it incrementally</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1129851": "Hello friends,\nI am trying to run training on entire dataset with EfficientNet-B7. Started with 600x600 image size, then reduced to 150. I still get memory issues while running with GPU on Kaggle or my local. My local machine has 8GB GPU.\n\nI am using TF-Hub EfficientNet-B7 feature extractor model. I made trainable false and has just one FC layer to do classification.\n\nI wanted to know how to avoid this running out of memory. I tried reducing batch size from 64 to 32 to 16. It gets delayed but runs out of memory anyway.\n\nShould I use lite version of the model? I am using cache as well for dataset. Any pointers would be helpful including if PyTorch helps here.\n\nThank you.",
    "1130021": "Have you tried loading any B0-B6 models? It could be that B7 just does not fit in your 8GB GPU, no matter what batch size it is. Try loading with bsize of 1 to confirm. if it works - increase it incrementally"
  },
  "source": "meta"
}