{
  "id": 128196,
  "title": "Maximum batch size",
  "url": "/competitions/bengaliai-cv19/discussion/128196",
  "author_name": "",
  "post_date": "2020-01-29T14:46:12.802285700Z",
  "votes": 1,
  "comment_count": 4,
  "views": 0,
  "content": "<p>What is the maximum batch_size did you use for your model?</p>",
  "messages": [
    {
      "id": "732176",
      "postDate": "01/29/2020 14:46:12",
      "content": "<p>What is the maximum batch_size did you use for your model?</p>",
      "rawMarkdown": "What is the maximum batch_size did you use for your model?",
      "votes": null
    },
    {
      "id": "732180",
      "postDate": "01/29/2020 14:47:50",
      "content": "<p>Mine : \nModel = Resnet 101 (single model)\nInput size = 128 * 128\nbatch_size = 130</p>",
      "rawMarkdown": "Mine : \nModel = Resnet 101 (single model)\nInput size = 128 * 128\nbatch_size = 130",
      "votes": null
    },
    {
      "id": "732412",
      "postDate": "01/29/2020 19:38:42",
      "content": "<p>On ResNet50 and DenseNet121 I manage to go all the way up to 512 on 75x75 images. Haven't tried multiple batch size / image sizes yet to see the effect; so far I'm mostly going for the quickest training times possible.</p>",
      "rawMarkdown": "On ResNet50 and DenseNet121 I manage to go all the way up to 512 on 75x75 images. Haven't tried multiple batch size / image sizes yet to see the effect; so far I'm mostly going for the quickest training times possible.",
      "votes": null
    },
    {
      "id": "735835",
      "postDate": "02/03/2020 13:59:22",
      "content": "<p><a href=\"/maxlenormand\">@maxlenormand</a>  That is very impressive! I cannot seem to go higher than 32 batches at 128x128 size using Colab's resources and DenseNet201 ... What do you think abou the use of 75x75 sized images instead to save some memory ?</p>",
      "rawMarkdown": "maxlenormand  That is very impressive! I cannot seem to go higher than 32 batches at 128x128 size using Colab's resources and DenseNet201 ... What do you think abou the use of 75x75 sized images instead to save some memory ?",
      "votes": null
    },
    {
      "id": "735929",
      "postDate": "02/03/2020 16:07:27",
      "content": "<p>Oh this was on Kaggle kernels, so I don´t  know if the GPUs have as much memory on both platforms? I know that the GPU you get allocated on Colab can change from on session to another.</p>\n\n<p>At the moment I'm trying to increase my batch size and reduce my image sizes to either increase my training time (higher number of epochs before hitting the kernel limit. Increasing epochs has allowed me to gain a few thousands of a point) or simply make training faster with a higher batch size.</p>\n\n<p>I'm never training on 128x128. I've done either 100x100 or 75x75. For now 75x75 seems pretty nice as it's about half the size in terms of pixels than a 100x100 image and I see very little difference. You also do save about half the amount of memory. With the limited hardware available it seems like a good sweet spot that I found.</p>\n\n<p>There's probably some gains to be had on the pre-processing of images though. We seem to be both stuck at the same score <a href=\"/dimartinot\">@dimartinot</a> so I'm guessing we are hitting the same wall and having a hard time improving our scores?</p>",
      "rawMarkdown": "Oh this was on Kaggle kernels, so I don´t  know if the GPUs have as much memory on both platforms? I know that the GPU you get allocated on Colab can change from on session to another.\n\nAt the moment I'm trying to increase my batch size and reduce my image sizes to either increase my training time (higher number of epochs before hitting the kernel limit. Increasing epochs has allowed me to gain a few thousands of a point) or simply make training faster with a higher batch size.\n\nI'm never training on 128x128. I've done either 100x100 or 75x75. For now 75x75 seems pretty nice as it's about half the size in terms of pixels than a 100x100 image and I see very little difference. You also do save about half the amount of memory. With the limited hardware available it seems like a good sweet spot that I found.\n\nThere's probably some gains to be had on the pre-processing of images though. We seem to be both stuck at the same score @dimartinot so I'm guessing we are hitting the same wall and having a hard time improving our scores?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 732180,
      "author_name": "karan07",
      "author_url": "",
      "post_date": "01/29/2020 14:47:50",
      "content": "<p>Mine : \nModel = Resnet 101 (single model)\nInput size = 128 * 128\nbatch_size = 130</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 732412,
      "author_name": "maxlenormand",
      "author_url": "",
      "post_date": "01/29/2020 19:38:42",
      "content": "<p>On ResNet50 and DenseNet121 I manage to go all the way up to 512 on 75x75 images. Haven't tried multiple batch size / image sizes yet to see the effect; so far I'm mostly going for the quickest training times possible.</p>",
      "votes": null,
      "replies": [
        {
          "id": 735835,
          "author_name": "dimartinot",
          "author_url": "",
          "post_date": "02/03/2020 13:59:22",
          "content": "<p><a href=\"/maxlenormand\">@maxlenormand</a>  That is very impressive! I cannot seem to go higher than 32 batches at 128x128 size using Colab's resources and DenseNet201 ... What do you think abou the use of 75x75 sized images instead to save some memory ?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 735929,
          "author_name": "maxlenormand",
          "author_url": "",
          "post_date": "02/03/2020 16:07:27",
          "content": "<p>Oh this was on Kaggle kernels, so I don´t  know if the GPUs have as much memory on both platforms? I know that the GPU you get allocated on Colab can change from on session to another.</p>\n\n<p>At the moment I'm trying to increase my batch size and reduce my image sizes to either increase my training time (higher number of epochs before hitting the kernel limit. Increasing epochs has allowed me to gain a few thousands of a point) or simply make training faster with a higher batch size.</p>\n\n<p>I'm never training on 128x128. I've done either 100x100 or 75x75. For now 75x75 seems pretty nice as it's about half the size in terms of pixels than a 100x100 image and I see very little difference. You also do save about half the amount of memory. With the limited hardware available it seems like a good sweet spot that I found.</p>\n\n<p>There's probably some gains to be had on the pre-processing of images though. We seem to be both stuck at the same score <a href=\"/dimartinot\">@dimartinot</a> so I'm guessing we are hitting the same wall and having a hard time improving our scores?</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "732176": "What is the maximum batch_size did you use for your model?",
    "732180": "Mine : \nModel = Resnet 101 (single model)\nInput size = 128 * 128\nbatch_size = 130",
    "732412": "On ResNet50 and DenseNet121 I manage to go all the way up to 512 on 75x75 images. Haven't tried multiple batch size / image sizes yet to see the effect; so far I'm mostly going for the quickest training times possible.",
    "735835": "maxlenormand  That is very impressive! I cannot seem to go higher than 32 batches at 128x128 size using Colab's resources and DenseNet201 ... What do you think abou the use of 75x75 sized images instead to save some memory ?",
    "735929": "Oh this was on Kaggle kernels, so I don´t  know if the GPUs have as much memory on both platforms? I know that the GPU you get allocated on Colab can change from on session to another.\n\nAt the moment I'm trying to increase my batch size and reduce my image sizes to either increase my training time (higher number of epochs before hitting the kernel limit. Increasing epochs has allowed me to gain a few thousands of a point) or simply make training faster with a higher batch size.\n\nI'm never training on 128x128. I've done either 100x100 or 75x75. For now 75x75 seems pretty nice as it's about half the size in terms of pixels than a 100x100 image and I see very little difference. You also do save about half the amount of memory. With the limited hardware available it seems like a good sweet spot that I found.\n\nThere's probably some gains to be had on the pre-processing of images though. We seem to be both stuck at the same score @dimartinot so I'm guessing we are hitting the same wall and having a hard time improving our scores?"
  },
  "source": "meta"
}