{
  "id": 107012,
  "title": "Two question, about EfficientNet and Rescale",
  "url": "/competitions/aptos2019-blindness-detection/discussion/107012",
  "author_name": "",
  "post_date": "2019-09-01T14:56:15.473472100Z",
  "votes": null,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I am learning a lot on this competition, but i have two major questions\n1o - In rescale we divide the vector of RGB by 255, but what's the advantage of rescale the images? Only to put the values between 0 and 1? Or the model improves with this transformation?</p>\n\n<p>2o - I have a 1080 ti, with EfficientNet my batch size is only 4 (bigger then this i got the error OOM) while in \"tradicional\" models my batch size is 32, why EF are heavier?</p>",
  "messages": [
    {
      "id": "615167",
      "postDate": "09/01/2019 14:56:15",
      "content": "<p>I am learning a lot on this competition, but i have two major questions\n1o - In rescale we divide the vector of RGB by 255, but what's the advantage of rescale the images? Only to put the values between 0 and 1? Or the model improves with this transformation?</p>\n\n<p>2o - I have a 1080 ti, with EfficientNet my batch size is only 4 (bigger then this i got the error OOM) while in \"tradicional\" models my batch size is 32, why EF are heavier?</p>",
      "rawMarkdown": "I am learning a lot on this competition, but i have two major questions\n1o - In rescale we divide the vector of RGB by 255, but what's the advantage of rescale the images? Only to put the values between 0 and 1? Or the model improves with this transformation?\n\n2o - I have a 1080 ti, with EfficientNet my batch size is only 4 (bigger then this i got the error OOM) while in \"tradicional\" models my batch size is 32, why EF are heavier?",
      "votes": null
    },
    {
      "id": "615481",
      "postDate": "09/02/2019 02:19:00",
      "content": "<p>What is your image size? if your image size is too bigger; It also can cause OOM; if your image size is right, just check your code, There maybe some logic problem.</p>",
      "rawMarkdown": "What is your image size? if your image size is too bigger; It also can cause OOM; if your image size is right, just check your code, There maybe some logic problem.",
      "votes": null
    },
    {
      "id": "616311",
      "postDate": "09/03/2019 01:48:12",
      "content": "<p>For EF5 (456x456)</p>",
      "rawMarkdown": "For EF5 (456x456)",
      "votes": null
    },
    {
      "id": "616312",
      "postDate": "09/03/2019 01:54:02",
      "content": "<p>It is too bigger; try batch size 16 or 8</p>",
      "rawMarkdown": "It is too bigger; try batch size 16 or 8",
      "votes": null
    },
    {
      "id": "616334",
      "postDate": "09/03/2019 02:43:12",
      "content": "<p>OOM error ;(\nAny BS bigger then 4 gives me error\nI am using fit generator,  not loading the images on memory...</p>",
      "rawMarkdown": "OOM error ;(\nAny BS bigger then 4 gives me error\nI am using fit generator,  not loading the images on memory...",
      "votes": null
    },
    {
      "id": "616629",
      "postDate": "09/03/2019 10:02:48",
      "content": "<p>You could try a smaller image size or maybe you want to use a small batch size with techniques like group normalization or gradient accumulation. This is an interesting discussion thread: <a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/104686#latest-616121\">Group Normalization</a></p>",
      "rawMarkdown": "You could try a smaller image size or maybe you want to use a small batch size with techniques like group normalization or gradient accumulation. This is an interesting discussion thread: [Group Normalization](https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/104686#latest-616121)",
      "votes": null
    },
    {
      "id": "616682",
      "postDate": "09/03/2019 11:11:37",
      "content": "<p>I'm using a GV100 quadro with Efficient Net and I'm also getting the OOM error. Batch size of 4 with image size 224 seems to be stable. I tried all sorts of iterations with image size 456 but somewhere along the training process it goes OOM. </p>\n\n<p>I'd suggest looking into DASK and Nvidia Rapids for help with this issue. DASK will help handle the memory issues with the higher res images and higher batch sizes. </p>",
      "rawMarkdown": "I'm using a GV100 quadro with Efficient Net and I'm also getting the OOM error. Batch size of 4 with image size 224 seems to be stable. I tried all sorts of iterations with image size 456 but somewhere along the training process it goes OOM. \n\nI'd suggest looking into DASK and Nvidia Rapids for help with this issue. DASK will help handle the memory issues with the higher res images and higher batch sizes.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 615481,
      "author_name": "oceanwong",
      "author_url": "",
      "post_date": "09/02/2019 02:19:00",
      "content": "<p>What is your image size? if your image size is too bigger; It also can cause OOM; if your image size is right, just check your code, There maybe some logic problem.</p>",
      "votes": null,
      "replies": [
        {
          "id": 616311,
          "author_name": "nandodmelo",
          "author_url": "",
          "post_date": "09/03/2019 01:48:12",
          "content": "<p>For EF5 (456x456)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 616312,
          "author_name": "oceanwong",
          "author_url": "",
          "post_date": "09/03/2019 01:54:02",
          "content": "<p>It is too bigger; try batch size 16 or 8</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 616334,
          "author_name": "nandodmelo",
          "author_url": "",
          "post_date": "09/03/2019 02:43:12",
          "content": "<p>OOM error ;(\nAny BS bigger then 4 gives me error\nI am using fit generator,  not loading the images on memory...</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 616629,
          "author_name": "flzieg",
          "author_url": "",
          "post_date": "09/03/2019 10:02:48",
          "content": "<p>You could try a smaller image size or maybe you want to use a small batch size with techniques like group normalization or gradient accumulation. This is an interesting discussion thread: <a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/104686#latest-616121\">Group Normalization</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 616682,
      "author_name": "sterls",
      "author_url": "",
      "post_date": "09/03/2019 11:11:37",
      "content": "<p>I'm using a GV100 quadro with Efficient Net and I'm also getting the OOM error. Batch size of 4 with image size 224 seems to be stable. I tried all sorts of iterations with image size 456 but somewhere along the training process it goes OOM. </p>\n\n<p>I'd suggest looking into DASK and Nvidia Rapids for help with this issue. DASK will help handle the memory issues with the higher res images and higher batch sizes. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "615167": "I am learning a lot on this competition, but i have two major questions\n1o - In rescale we divide the vector of RGB by 255, but what's the advantage of rescale the images? Only to put the values between 0 and 1? Or the model improves with this transformation?\n\n2o - I have a 1080 ti, with EfficientNet my batch size is only 4 (bigger then this i got the error OOM) while in \"tradicional\" models my batch size is 32, why EF are heavier?",
    "615481": "What is your image size? if your image size is too bigger; It also can cause OOM; if your image size is right, just check your code, There maybe some logic problem.",
    "616311": "For EF5 (456x456)",
    "616312": "It is too bigger; try batch size 16 or 8",
    "616334": "OOM error ;(\nAny BS bigger then 4 gives me error\nI am using fit generator,  not loading the images on memory...",
    "616629": "You could try a smaller image size or maybe you want to use a small batch size with techniques like group normalization or gradient accumulation. This is an interesting discussion thread: [Group Normalization](https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/104686#latest-616121)",
    "616682": "I'm using a GV100 quadro with Efficient Net and I'm also getting the OOM error. Batch size of 4 with image size 224 seems to be stable. I tried all sorts of iterations with image size 456 but somewhere along the training process it goes OOM. \n\nI'd suggest looking into DASK and Nvidia Rapids for help with this issue. DASK will help handle the memory issues with the higher res images and higher batch sizes."
  },
  "source": "meta"
}