{
  "id": 214986,
  "title": "Different  Results when training in Kaggle GPu vs My Laptop",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/214986",
  "author_name": "",
  "post_date": "2021-01-28T08:23:27.050579400Z",
  "votes": null,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Hello,<br>\nSo, I am trying out efficient net-B4 architecture, I ran out of GPU quota so I thought of training the same exact notebook on my laptop (with batch size 2 as my VRAM is only 6GB). The problem is during training on kaggle GPU's I am reaching CV accuracy around 90% and it got canceled after 9Hrs, but the same notebook on my laptop is stuck at around 60%.</p>\n<p><strong>My specs:</strong></p>\n<ul>\n<li>intel i7 9th gen</li>\n<li>RTX 2060 6GB VRAM</li>\n<li>RAM 16 GB</li>\n</ul>\n<p>I have tensorflow and keras installed perfectly with respective CUDA and CuDNN versions.(No issues there)</p>\n<p>Thanks in Advance.</p>\n<p><strong>Link to my notebook:</strong><br>\n<a href=\"https://www.kaggle.com/mohneesh7/cassava-leaf-disease-detection-keras\" target=\"_blank\">This One</a></p>",
  "messages": [
    {
      "id": "1174026",
      "postDate": "01/28/2021 08:23:27",
      "content": "<p>Hello,<br>\nSo, I am trying out efficient net-B4 architecture, I ran out of GPU quota so I thought of training the same exact notebook on my laptop (with batch size 2 as my VRAM is only 6GB). The problem is during training on kaggle GPU's I am reaching CV accuracy around 90% and it got canceled after 9Hrs, but the same notebook on my laptop is stuck at around 60%.</p>\n<p><strong>My specs:</strong></p>\n<ul>\n<li>intel i7 9th gen</li>\n<li>RTX 2060 6GB VRAM</li>\n<li>RAM 16 GB</li>\n</ul>\n<p>I have tensorflow and keras installed perfectly with respective CUDA and CuDNN versions.(No issues there)</p>\n<p>Thanks in Advance.</p>\n<p><strong>Link to my notebook:</strong><br>\n<a href=\"https://www.kaggle.com/mohneesh7/cassava-leaf-disease-detection-keras\" target=\"_blank\">This One</a></p>",
      "rawMarkdown": "Hello,\nSo, I am trying out efficient net-B4 architecture, I ran out of GPU quota so I thought of training the same exact notebook on my laptop (with batch size 2 as my VRAM is only 6GB). The problem is during training on kaggle GPU's I am reaching CV accuracy around 90% and it got canceled after 9Hrs, but the same notebook on my laptop is stuck at around 60%.\n\n**My specs:**\n- intel i7 9th gen\n- RTX 2060 6GB VRAM\n- RAM 16 GB\n\nI have tensorflow and keras installed perfectly with respective CUDA and CuDNN versions.(No issues there)\n\nThanks in Advance.\n\n**Link to my notebook:**\n[This One](https://www.kaggle.com/mohneesh7/cassava-leaf-disease-detection-keras)",
      "votes": null
    },
    {
      "id": "1174083",
      "postDate": "01/28/2021 08:55:28",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/mohneesh7\" target=\"_blank\">@mohneesh7</a>,</p>\n<p>Generally, CV accuracy changes due to some reason,</p>\n<ul>\n<li>One of the reasons is the initialization of the network. Due to this, we get different results on every training but it doesn't vary too much.</li>\n<li>The other reason is batch_size or hyper-parameters.</li>\n</ul>\n<p>But then also I had never seen this much of change in results due to only hardware change. Try batch_size=2 in Kaggle and check results.</p>",
      "rawMarkdown": "Hi @mohneesh7,\n\nGenerally, CV accuracy changes due to some reason,\n* One of the reasons is the initialization of the network. Due to this, we get different results on every training but it doesn't vary too much.\n* The other reason is batch_size or hyper-parameters.\n\nBut then also I had never seen this much of change in results due to only hardware change. Try batch_size=2 in Kaggle and check results.",
      "votes": null
    },
    {
      "id": "1175292",
      "postDate": "01/29/2021 04:26:23",
      "content": "<p>Unrelated to This but You should try out mixed precision, since you have a rtx 2060 mixed precision would work well. It will also help you increase your batch size and your training time would be halved. If your are using tensorflow refer To this   <a href=\"https://www.tensorflow.org/guide/mixed_precision\" target=\"_blank\">https://www.tensorflow.org/guide/mixed_precision</a></p>",
      "rawMarkdown": "Unrelated to This but You should try out mixed precision, since you have a rtx 2060 mixed precision would work well. It will also help you increase your batch size and your training time would be halved. If your are using tensorflow refer To this   https://www.tensorflow.org/guide/mixed_precision",
      "votes": null
    },
    {
      "id": "1175400",
      "postDate": "01/29/2021 06:21:29",
      "content": "<p>Thanks for the heads up, I am already using mixed precision on a different private notebook that I am using for the competition. It really is very helpful in training time reduction.<br>\nAnyways thanks for the suggestion.</p>",
      "rawMarkdown": "Thanks for the heads up, I am already using mixed precision on a different private notebook that I am using for the competition. It really is very helpful in training time reduction.\nAnyways thanks for the suggestion.",
      "votes": null
    },
    {
      "id": "1175404",
      "postDate": "01/29/2021 06:25:11",
      "content": "<p>I understand that the initialization of the network weights and the random seeds affect the training time and accuracy a little bit. <br>\nBut the difference b/w both hardware is just too much, that I am positive it isn't the network initialization.<br>\nanyways thanks for the suggestion. I will now wait for my kaggle quota to come back.</p>",
      "rawMarkdown": "I understand that the initialization of the network weights and the random seeds affect the training time and accuracy a little bit. \nBut the difference b/w both hardware is just too much, that I am positive it isn't the network initialization.\nanyways thanks for the suggestion. I will now wait for my kaggle quota to come back.",
      "votes": null
    },
    {
      "id": "1175590",
      "postDate": "01/29/2021 08:37:17",
      "content": "<p>And If you still have problems with your quota, I suggest you try colab. It is a bit slower than kaggle but when you run out of quota Try training on colab instead of training on your Laptop.  </p>",
      "rawMarkdown": "And If you still have problems with your quota, I suggest you try colab. It is a bit slower than kaggle but when you run out of quota Try training on colab instead of training on your Laptop.",
      "votes": null
    },
    {
      "id": "1175640",
      "postDate": "01/29/2021 09:09:00",
      "content": "<p>Can you give me a colab URL?</p>",
      "rawMarkdown": "Can you give me a colab URL?",
      "votes": null
    },
    {
      "id": "1175674",
      "postDate": "01/29/2021 09:26:27",
      "content": "<p><a href=\"https://www.kaggle.com/zhangeng\" target=\"_blank\">@zhangeng</a> <a href=\"https://colab.research.google.com/\" target=\"_blank\">https://colab.research.google.com/</a></p>",
      "rawMarkdown": "zhangeng https://colab.research.google.com/",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1174083,
      "author_name": "vatsalmavani",
      "author_url": "",
      "post_date": "01/28/2021 08:55:28",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/mohneesh7\" target=\"_blank\">@mohneesh7</a>,</p>\n<p>Generally, CV accuracy changes due to some reason,</p>\n<ul>\n<li>One of the reasons is the initialization of the network. Due to this, we get different results on every training but it doesn't vary too much.</li>\n<li>The other reason is batch_size or hyper-parameters.</li>\n</ul>\n<p>But then also I had never seen this much of change in results due to only hardware change. Try batch_size=2 in Kaggle and check results.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1175404,
          "author_name": "mohneesh7",
          "author_url": "",
          "post_date": "01/29/2021 06:25:11",
          "content": "<p>I understand that the initialization of the network weights and the random seeds affect the training time and accuracy a little bit. <br>\nBut the difference b/w both hardware is just too much, that I am positive it isn't the network initialization.<br>\nanyways thanks for the suggestion. I will now wait for my kaggle quota to come back.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1175292,
      "author_name": "mithilsalunkhe",
      "author_url": "",
      "post_date": "01/29/2021 04:26:23",
      "content": "<p>Unrelated to This but You should try out mixed precision, since you have a rtx 2060 mixed precision would work well. It will also help you increase your batch size and your training time would be halved. If your are using tensorflow refer To this   <a href=\"https://www.tensorflow.org/guide/mixed_precision\" target=\"_blank\">https://www.tensorflow.org/guide/mixed_precision</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1175400,
          "author_name": "mohneesh7",
          "author_url": "",
          "post_date": "01/29/2021 06:21:29",
          "content": "<p>Thanks for the heads up, I am already using mixed precision on a different private notebook that I am using for the competition. It really is very helpful in training time reduction.<br>\nAnyways thanks for the suggestion.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1175590,
      "author_name": "mithilsalunkhe",
      "author_url": "",
      "post_date": "01/29/2021 08:37:17",
      "content": "<p>And If you still have problems with your quota, I suggest you try colab. It is a bit slower than kaggle but when you run out of quota Try training on colab instead of training on your Laptop.  </p>",
      "votes": null,
      "replies": [
        {
          "id": 1175640,
          "author_name": "zhangeng",
          "author_url": "",
          "post_date": "01/29/2021 09:09:00",
          "content": "<p>Can you give me a colab URL?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1175674,
          "author_name": "mithilsalunkhe",
          "author_url": "",
          "post_date": "01/29/2021 09:26:27",
          "content": "<p><a href=\"https://www.kaggle.com/zhangeng\" target=\"_blank\">@zhangeng</a> <a href=\"https://colab.research.google.com/\" target=\"_blank\">https://colab.research.google.com/</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1174026": "Hello,\nSo, I am trying out efficient net-B4 architecture, I ran out of GPU quota so I thought of training the same exact notebook on my laptop (with batch size 2 as my VRAM is only 6GB). The problem is during training on kaggle GPU's I am reaching CV accuracy around 90% and it got canceled after 9Hrs, but the same notebook on my laptop is stuck at around 60%.\n\n**My specs:**\n- intel i7 9th gen\n- RTX 2060 6GB VRAM\n- RAM 16 GB\n\nI have tensorflow and keras installed perfectly with respective CUDA and CuDNN versions.(No issues there)\n\nThanks in Advance.\n\n**Link to my notebook:**\n[This One](https://www.kaggle.com/mohneesh7/cassava-leaf-disease-detection-keras)",
    "1174083": "Hi @mohneesh7,\n\nGenerally, CV accuracy changes due to some reason,\n* One of the reasons is the initialization of the network. Due to this, we get different results on every training but it doesn't vary too much.\n* The other reason is batch_size or hyper-parameters.\n\nBut then also I had never seen this much of change in results due to only hardware change. Try batch_size=2 in Kaggle and check results.",
    "1175292": "Unrelated to This but You should try out mixed precision, since you have a rtx 2060 mixed precision would work well. It will also help you increase your batch size and your training time would be halved. If your are using tensorflow refer To this   https://www.tensorflow.org/guide/mixed_precision",
    "1175400": "Thanks for the heads up, I am already using mixed precision on a different private notebook that I am using for the competition. It really is very helpful in training time reduction.\nAnyways thanks for the suggestion.",
    "1175404": "I understand that the initialization of the network weights and the random seeds affect the training time and accuracy a little bit. \nBut the difference b/w both hardware is just too much, that I am positive it isn't the network initialization.\nanyways thanks for the suggestion. I will now wait for my kaggle quota to come back.",
    "1175590": "And If you still have problems with your quota, I suggest you try colab. It is a bit slower than kaggle but when you run out of quota Try training on colab instead of training on your Laptop.",
    "1175640": "Can you give me a colab URL?",
    "1175674": "zhangeng https://colab.research.google.com/"
  },
  "source": "meta"
}