{
  "id": 145794,
  "title": "How to use EfficientNet + TPU for Pytorch?",
  "url": "/competitions/flower-classification-with-tpus/discussion/145794",
  "author_name": "",
  "post_date": "2020-04-24T14:42:04.066914900Z",
  "votes": 6,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hi, I'm a Pytorch lover.\nSo, I'm trying to use Pytorch.</p>\n\n<p>I already use TPU using Pytorch in other competition.</p>\n\n<p><a href=\"https://www.kaggle.com/piantic/pytorch-tpu\">https://www.kaggle.com/piantic/pytorch-tpu</a>\n<a href=\"https://www.kaggle.com/piantic/plant-pathology-2020-pytorch-for-beginner\">https://www.kaggle.com/piantic/plant-pathology-2020-pytorch-for-beginner</a>\n(This is GPU version.)\nWhen I use Efficientnet(pretrained) in Pytorch,\nI found 2 github repo for Efficientnet.</p>\n\n<p>(1) <a href=\"https://github.com/lukemelas/EfficientNet-PyTorch\">https://github.com/lukemelas/EfficientNet-PyTorch</a>\n(2) <a href=\"https://github.com/rwightman/gen-efficientnet-pytorch\">https://github.com/rwightman/gen-efficientnet-pytorch</a>\nFail to run script - (1)\nSuccess to run, but It 's speed too slow and utilization of TPU is 0 - (2)\nAnd I already search TPU + Efficientnet for pytorch in google.\nBut I can't find any example.\n(So, I just use other pretrained models not efficientnet or use TF 2.0)</p>\n\n<p>Could you help me that use efficientnet + TPU for Pytorch?</p>\n\n<p>I'll update 'Pytorch + TPU' kernel and share it for everyone.\nThanks.</p>",
  "messages": [
    {
      "id": "819371",
      "postDate": "04/24/2020 14:42:04",
      "content": "<p>Hi, I'm a Pytorch lover.\nSo, I'm trying to use Pytorch.</p>\n\n<p>I already use TPU using Pytorch in other competition.</p>\n\n<p><a href=\"https://www.kaggle.com/piantic/pytorch-tpu\">https://www.kaggle.com/piantic/pytorch-tpu</a>\n<a href=\"https://www.kaggle.com/piantic/plant-pathology-2020-pytorch-for-beginner\">https://www.kaggle.com/piantic/plant-pathology-2020-pytorch-for-beginner</a>\n(This is GPU version.)\nWhen I use Efficientnet(pretrained) in Pytorch,\nI found 2 github repo for Efficientnet.</p>\n\n<p>(1) <a href=\"https://github.com/lukemelas/EfficientNet-PyTorch\">https://github.com/lukemelas/EfficientNet-PyTorch</a>\n(2) <a href=\"https://github.com/rwightman/gen-efficientnet-pytorch\">https://github.com/rwightman/gen-efficientnet-pytorch</a>\nFail to run script - (1)\nSuccess to run, but It 's speed too slow and utilization of TPU is 0 - (2)\nAnd I already search TPU + Efficientnet for pytorch in google.\nBut I can't find any example.\n(So, I just use other pretrained models not efficientnet or use TF 2.0)</p>\n\n<p>Could you help me that use efficientnet + TPU for Pytorch?</p>\n\n<p>I'll update 'Pytorch + TPU' kernel and share it for everyone.\nThanks.</p>",
      "rawMarkdown": "Hi, I'm a Pytorch lover.\nSo, I'm trying to use Pytorch.\n\nI already use TPU using Pytorch in other competition.\n\nhttps://www.kaggle.com/piantic/pytorch-tpu\nhttps://www.kaggle.com/piantic/plant-pathology-2020-pytorch-for-beginner\n(This is GPU version.)\nWhen I use Efficientnet(pretrained) in Pytorch,\nI found 2 github repo for Efficientnet.\n\n(1) https://github.com/lukemelas/EfficientNet-PyTorch\n(2) https://github.com/rwightman/gen-efficientnet-pytorch\nFail to run script - (1)\nSuccess to run, but It 's speed too slow and utilization of TPU is 0 - (2)\nAnd I already search TPU + Efficientnet for pytorch in google.\nBut I can't find any example.\n(So, I just use other pretrained models not efficientnet or use TF 2.0)\n\nCould you help me that use efficientnet + TPU for Pytorch?\n\nI'll update 'Pytorch + TPU' kernel and share it for everyone.\nThanks.",
      "votes": null
    },
    {
      "id": "819647",
      "postDate": "04/24/2020 18:43:06",
      "content": "<p>Here is a TPU sample from <a href=\"/abhishek\">@abhishek</a> . You'll have to swap the model and the dataset.\n<a href=\"https://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification/discussion/143613\">https://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification/discussion/143613</a>\nA bit of complexity on the dataset side as you will have to go from an in memory dataset to an out of memory dataset loaded on the fly from GCS during training.</p>",
      "rawMarkdown": "Here is a TPU sample from @abhishek . You'll have to swap the model and the dataset.\nhttps://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification/discussion/143613\nA bit of complexity on the dataset side as you will have to go from an in memory dataset to an out of memory dataset loaded on the fly from GCS during training.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 819647,
      "author_name": "mgorner",
      "author_url": "",
      "post_date": "04/24/2020 18:43:06",
      "content": "<p>Here is a TPU sample from <a href=\"/abhishek\">@abhishek</a> . You'll have to swap the model and the dataset.\n<a href=\"https://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification/discussion/143613\">https://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification/discussion/143613</a>\nA bit of complexity on the dataset side as you will have to go from an in memory dataset to an out of memory dataset loaded on the fly from GCS during training.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "819371": "Hi, I'm a Pytorch lover.\nSo, I'm trying to use Pytorch.\n\nI already use TPU using Pytorch in other competition.\n\nhttps://www.kaggle.com/piantic/pytorch-tpu\nhttps://www.kaggle.com/piantic/plant-pathology-2020-pytorch-for-beginner\n(This is GPU version.)\nWhen I use Efficientnet(pretrained) in Pytorch,\nI found 2 github repo for Efficientnet.\n\n(1) https://github.com/lukemelas/EfficientNet-PyTorch\n(2) https://github.com/rwightman/gen-efficientnet-pytorch\nFail to run script - (1)\nSuccess to run, but It 's speed too slow and utilization of TPU is 0 - (2)\nAnd I already search TPU + Efficientnet for pytorch in google.\nBut I can't find any example.\n(So, I just use other pretrained models not efficientnet or use TF 2.0)\n\nCould you help me that use efficientnet + TPU for Pytorch?\n\nI'll update 'Pytorch + TPU' kernel and share it for everyone.\nThanks.",
    "819647": "Here is a TPU sample from @abhishek . You'll have to swap the model and the dataset.\nhttps://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification/discussion/143613\nA bit of complexity on the dataset side as you will have to go from an in memory dataset to an out of memory dataset loaded on the fly from GCS during training."
  },
  "source": "meta"
}