{
  "id": 99384,
  "title": "Anyone using colab with TPU?",
  "url": "/competitions/aptos2019-blindness-detection/discussion/99384",
  "author_name": "",
  "post_date": "2019-07-10T21:06:58.675012600Z",
  "votes": null,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I don't have much processing power and Kaggle kernels are nice but a bit slow process to run more epochs to train a model.</p>\n\n<p>So I wanted to try Google Colab and the \"free\" TPU provided. Looks great but I could not find good ways to use it with larger datasets. The local VM disk on Colab is quite limited in size, and accessing the training images from Google drive is slow. I set up a Google Cloud Storage bucket to upload the data into, but from what I understand this is also over the network, and could also not find good examples of how to set it up with Keras.</p>\n\n<p>Any pointers on how to train a CNN with Keras on Colab TPU using large datasets?</p>",
  "messages": [
    {
      "id": "572381",
      "postDate": "07/10/2019 21:06:58",
      "content": "<p>I don't have much processing power and Kaggle kernels are nice but a bit slow process to run more epochs to train a model.</p>\n\n<p>So I wanted to try Google Colab and the \"free\" TPU provided. Looks great but I could not find good ways to use it with larger datasets. The local VM disk on Colab is quite limited in size, and accessing the training images from Google drive is slow. I set up a Google Cloud Storage bucket to upload the data into, but from what I understand this is also over the network, and could also not find good examples of how to set it up with Keras.</p>\n\n<p>Any pointers on how to train a CNN with Keras on Colab TPU using large datasets?</p>",
      "rawMarkdown": "I don't have much processing power and Kaggle kernels are nice but a bit slow process to run more epochs to train a model.\n\nSo I wanted to try Google Colab and the \"free\" TPU provided. Looks great but I could not find good ways to use it with larger datasets. The local VM disk on Colab is quite limited in size, and accessing the training images from Google drive is slow. I set up a Google Cloud Storage bucket to upload the data into, but from what I understand this is also over the network, and could also not find good examples of how to set it up with Keras.\n\nAny pointers on how to train a CNN with Keras on Colab TPU using large datasets?",
      "votes": null
    },
    {
      "id": "572417",
      "postDate": "07/10/2019 23:09:33",
      "content": "<p>I use Google Colab with GPU and PyTorch/fastai and it works fine. It is only slightly faster (ex: a couple minutes less per epoch compared to Kaggle Kernels). I don't know much about the space when using TPU, but GPU has plenty of space (329 GB IIRC)</p>",
      "rawMarkdown": "I use Google Colab with GPU and PyTorch/fastai and it works fine. It is only slightly faster (ex: a couple minutes less per epoch compared to Kaggle Kernels). I don't know much about the space when using TPU, but GPU has plenty of space (329 GB IIRC)",
      "votes": null
    },
    {
      "id": "572655",
      "postDate": "07/11/2019 08:14:10",
      "content": "<p>Colab GPU has about 300+GB as you said. TPU has only about 40+GB, and half of that is taken by the OS and libraries installed on the VM. So it is very tight on space. There is also some discussion on the TPU being located on its own server, which also likely has some impact on how to best make use of all this. I would expect the TPU to be much faster compared to the GPU, for which one might as well use the Kaggle kernels. I guess I will have to try and experiment with various options, ...</p>",
      "rawMarkdown": "Colab GPU has about 300+GB as you said. TPU has only about 40+GB, and half of that is taken by the OS and libraries installed on the VM. So it is very tight on space. There is also some discussion on the TPU being located on its own server, which also likely has some impact on how to best make use of all this. I would expect the TPU to be much faster compared to the GPU, for which one might as well use the Kaggle kernels. I guess I will have to try and experiment with various options, ...",
      "votes": null
    },
    {
      "id": "614320",
      "postDate": "08/31/2019 10:56:37",
      "content": "<p>I have started using Google Colab with GPU. It seems to be working slightly better than Kaggle Kernels.. </p>",
      "rawMarkdown": "I have started using Google Colab with GPU. It seems to be working slightly better than Kaggle Kernels..",
      "votes": null
    },
    {
      "id": "614328",
      "postDate": "08/31/2019 11:10:11",
      "content": "<p>what is better exactly?</p>",
      "rawMarkdown": "what is better exactly?",
      "votes": null
    },
    {
      "id": "614336",
      "postDate": "08/31/2019 11:21:53",
      "content": "<p>I think in a number of GPU hour usage, Colab is better. But still, kaggle kernel can compensate that hour usage because kaggle kernel GPU (P100) is better than Colab (K80). Please do note also that there's an intermittent connection happening in Colab.</p>",
      "rawMarkdown": "I think in a number of GPU hour usage, Colab is better. But still, kaggle kernel can compensate that hour usage because kaggle kernel GPU (P100) is better than Colab (K80). Please do note also that there's an intermittent connection happening in Colab.",
      "votes": null
    },
    {
      "id": "614349",
      "postDate": "08/31/2019 11:44:13",
      "content": "<p>thanks for the answer. I might give it a shot now when we have new restrictions here</p>",
      "rawMarkdown": "thanks for the answer. I might give it a shot now when we have new restrictions here",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 572417,
      "author_name": "tanlikesmath",
      "author_url": "",
      "post_date": "07/10/2019 23:09:33",
      "content": "<p>I use Google Colab with GPU and PyTorch/fastai and it works fine. It is only slightly faster (ex: a couple minutes less per epoch compared to Kaggle Kernels). I don't know much about the space when using TPU, but GPU has plenty of space (329 GB IIRC)</p>",
      "votes": null,
      "replies": [
        {
          "id": 572655,
          "author_name": "donkeys",
          "author_url": "",
          "post_date": "07/11/2019 08:14:10",
          "content": "<p>Colab GPU has about 300+GB as you said. TPU has only about 40+GB, and half of that is taken by the OS and libraries installed on the VM. So it is very tight on space. There is also some discussion on the TPU being located on its own server, which also likely has some impact on how to best make use of all this. I would expect the TPU to be much faster compared to the GPU, for which one might as well use the Kaggle kernels. I guess I will have to try and experiment with various options, ...</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 614320,
      "author_name": "manojprabhaakr",
      "author_url": "",
      "post_date": "08/31/2019 10:56:37",
      "content": "<p>I have started using Google Colab with GPU. It seems to be working slightly better than Kaggle Kernels.. </p>",
      "votes": null,
      "replies": [
        {
          "id": 614328,
          "author_name": "valanm",
          "author_url": "",
          "post_date": "08/31/2019 11:10:11",
          "content": "<p>what is better exactly?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 614336,
          "author_name": "projdev",
          "author_url": "",
          "post_date": "08/31/2019 11:21:53",
          "content": "<p>I think in a number of GPU hour usage, Colab is better. But still, kaggle kernel can compensate that hour usage because kaggle kernel GPU (P100) is better than Colab (K80). Please do note also that there's an intermittent connection happening in Colab.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 614349,
          "author_name": "valanm",
          "author_url": "",
          "post_date": "08/31/2019 11:44:13",
          "content": "<p>thanks for the answer. I might give it a shot now when we have new restrictions here</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "572381": "I don't have much processing power and Kaggle kernels are nice but a bit slow process to run more epochs to train a model.\n\nSo I wanted to try Google Colab and the \"free\" TPU provided. Looks great but I could not find good ways to use it with larger datasets. The local VM disk on Colab is quite limited in size, and accessing the training images from Google drive is slow. I set up a Google Cloud Storage bucket to upload the data into, but from what I understand this is also over the network, and could also not find good examples of how to set it up with Keras.\n\nAny pointers on how to train a CNN with Keras on Colab TPU using large datasets?",
    "572417": "I use Google Colab with GPU and PyTorch/fastai and it works fine. It is only slightly faster (ex: a couple minutes less per epoch compared to Kaggle Kernels). I don't know much about the space when using TPU, but GPU has plenty of space (329 GB IIRC)",
    "572655": "Colab GPU has about 300+GB as you said. TPU has only about 40+GB, and half of that is taken by the OS and libraries installed on the VM. So it is very tight on space. There is also some discussion on the TPU being located on its own server, which also likely has some impact on how to best make use of all this. I would expect the TPU to be much faster compared to the GPU, for which one might as well use the Kaggle kernels. I guess I will have to try and experiment with various options, ...",
    "614320": "I have started using Google Colab with GPU. It seems to be working slightly better than Kaggle Kernels..",
    "614328": "what is better exactly?",
    "614336": "I think in a number of GPU hour usage, Colab is better. But still, kaggle kernel can compensate that hour usage because kaggle kernel GPU (P100) is better than Colab (K80). Please do note also that there's an intermittent connection happening in Colab.",
    "614349": "thanks for the answer. I might give it a shot now when we have new restrictions here"
  },
  "source": "meta"
}