{
  "id": 167664,
  "title": "Keras vs PyTorch (and TFRecords)",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/167664",
  "author_name": "",
  "post_date": "2020-07-17T12:36:51.222019200Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I'm not really an expert with PyTorch, </p>\n\n<p>but as far as I understand with Tensorflow if we want to load images fast (and make full use of GPU, TPU) we need to use TFRecords. ImageDataGenerator are simply for joking and for using image_dataset_from_directory we need to wait for TF2.3 (seems that with Tensorflow you need always the next release...).\nThis competition we had the great work from <a href=\"/cdeotte\">@cdeotte</a>... but it is not really a pleasure to package in TFRecords and, as we have seen, this is a step that needs to be repeated) \nWith PyTorch as far as I have seen you can do fast load starting directly from JPEG in a directory. Am I right?</p>\n\n<p>Would be nice to hear from top Kagglers what they think about TF and PyTorch (ok, I see that it is a million $ question, but this is the way we could learn on the fundamentals questions regarding the life in the (Kaggle) universe</p>\n\n<p>btw: after years of being-in-love-with Keras I'm seriously studying PyTorch.</p>",
  "messages": [
    {
      "id": "933026",
      "postDate": "07/17/2020 12:36:51",
      "content": "<p>I'm not really an expert with PyTorch, </p>\n\n<p>but as far as I understand with Tensorflow if we want to load images fast (and make full use of GPU, TPU) we need to use TFRecords. ImageDataGenerator are simply for joking and for using image_dataset_from_directory we need to wait for TF2.3 (seems that with Tensorflow you need always the next release...).\nThis competition we had the great work from <a href=\"/cdeotte\">@cdeotte</a>... but it is not really a pleasure to package in TFRecords and, as we have seen, this is a step that needs to be repeated) \nWith PyTorch as far as I have seen you can do fast load starting directly from JPEG in a directory. Am I right?</p>\n\n<p>Would be nice to hear from top Kagglers what they think about TF and PyTorch (ok, I see that it is a million $ question, but this is the way we could learn on the fundamentals questions regarding the life in the (Kaggle) universe</p>\n\n<p>btw: after years of being-in-love-with Keras I'm seriously studying PyTorch.</p>",
      "rawMarkdown": "I'm not really an expert with PyTorch, \n\nbut as far as I understand with Tensorflow if we want to load images fast (and make full use of GPU, TPU) we need to use TFRecords. ImageDataGenerator are simply for joking and for using image_dataset_from_directory we need to wait for TF2.3 (seems that with Tensorflow you need always the next release...).\nThis competition we had the great work from @cdeotte... but it is not really a pleasure to package in TFRecords and, as we have seen, this is a step that needs to be repeated) \nWith PyTorch as far as I have seen you can do fast load starting directly from JPEG in a directory. Am I right?\n\nWould be nice to hear from top Kagglers what they think about TF and PyTorch (ok, I see that it is a million $ question, but this is the way we could learn on the fundamentals questions regarding the life in the (Kaggle) universe\n\nbtw: after years of being-in-love-with Keras I'm seriously studying PyTorch.",
      "votes": null
    },
    {
      "id": "933676",
      "postDate": "07/17/2020 22:22:25",
      "content": "<p>In the Severstal competition I started from using Keras and Kaggle Kernels then during competition Kaggle introduced GPU limits so i bought GPU to use at home then I switched from Keras to Pytorch. In this competition I am trying to continue my adventure with PyTorch simply because it's awesome. However, using TPU with pytorch was a great challenge, it took me more than week to understand the issues. </p>\n\n<p>I use only jpegs which I process myself. Looking at original tfrecords is still something todo.</p>\n\n<p>As usual even if my score will be low at least I learn a lot from this competition.</p>",
      "rawMarkdown": "In the Severstal competition I started from using Keras and Kaggle Kernels then during competition Kaggle introduced GPU limits so i bought GPU to use at home then I switched from Keras to Pytorch. In this competition I am trying to continue my adventure with PyTorch simply because it's awesome. However, using TPU with pytorch was a great challenge, it took me more than week to understand the issues. \n\nI use only jpegs which I process myself. Looking at original tfrecords is still something todo.\n\nAs usual even if my score will be low at least I learn a lot from this competition.",
      "votes": null
    },
    {
      "id": "934721",
      "postDate": "07/18/2020 17:09:47",
      "content": "<p>I think load JPEG and TFRecord is the same.  </p>",
      "rawMarkdown": "I think load JPEG and TFRecord is the same.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 933676,
      "author_name": "jacekpoplawski",
      "author_url": "",
      "post_date": "07/17/2020 22:22:25",
      "content": "<p>In the Severstal competition I started from using Keras and Kaggle Kernels then during competition Kaggle introduced GPU limits so i bought GPU to use at home then I switched from Keras to Pytorch. In this competition I am trying to continue my adventure with PyTorch simply because it's awesome. However, using TPU with pytorch was a great challenge, it took me more than week to understand the issues. </p>\n\n<p>I use only jpegs which I process myself. Looking at original tfrecords is still something todo.</p>\n\n<p>As usual even if my score will be low at least I learn a lot from this competition.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 934721,
      "author_name": "doanquanvietnamca",
      "author_url": "",
      "post_date": "07/18/2020 17:09:47",
      "content": "<p>I think load JPEG and TFRecord is the same.  </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "933026": "I'm not really an expert with PyTorch, \n\nbut as far as I understand with Tensorflow if we want to load images fast (and make full use of GPU, TPU) we need to use TFRecords. ImageDataGenerator are simply for joking and for using image_dataset_from_directory we need to wait for TF2.3 (seems that with Tensorflow you need always the next release...).\nThis competition we had the great work from @cdeotte... but it is not really a pleasure to package in TFRecords and, as we have seen, this is a step that needs to be repeated) \nWith PyTorch as far as I have seen you can do fast load starting directly from JPEG in a directory. Am I right?\n\nWould be nice to hear from top Kagglers what they think about TF and PyTorch (ok, I see that it is a million $ question, but this is the way we could learn on the fundamentals questions regarding the life in the (Kaggle) universe\n\nbtw: after years of being-in-love-with Keras I'm seriously studying PyTorch.",
    "933676": "In the Severstal competition I started from using Keras and Kaggle Kernels then during competition Kaggle introduced GPU limits so i bought GPU to use at home then I switched from Keras to Pytorch. In this competition I am trying to continue my adventure with PyTorch simply because it's awesome. However, using TPU with pytorch was a great challenge, it took me more than week to understand the issues. \n\nI use only jpegs which I process myself. Looking at original tfrecords is still something todo.\n\nAs usual even if my score will be low at least I learn a lot from this competition.",
    "934721": "I think load JPEG and TFRecord is the same."
  },
  "source": "meta"
}