{
  "id": 171339,
  "title": "training time is huge ",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/171339",
  "author_name": "",
  "post_date": "2020-07-31T12:23:03.150159300Z",
  "votes": null,
  "comment_count": 7,
  "views": 0,
  "content": "<p>i am using pytorch and make custome dataset and using jpeg folder to laod image and resize it to 256 *256 and using pretrained resnset32 but still each epoch time is 1 hrs 40 mins so what is problem let me know it stops me to even submit my first submission </p>",
  "messages": [
    {
      "id": "953002",
      "postDate": "07/31/2020 12:23:03",
      "content": "<p>i am using pytorch and make custome dataset and using jpeg folder to laod image and resize it to 256 *256 and using pretrained resnset32 but still each epoch time is 1 hrs 40 mins so what is problem let me know it stops me to even submit my first submission </p>",
      "rawMarkdown": "i am using pytorch and make custome dataset and using jpeg folder to laod image and resize it to 256 *256 and using pretrained resnset32 but still each epoch time is 1 hrs 40 mins so what is problem let me know it stops me to even submit my first submission",
      "votes": null
    },
    {
      "id": "953070",
      "postDate": "07/31/2020 13:54:59",
      "content": "<p>If you are resizing in your training loop,  you need to resize ahead of time and store the 256x256 images. </p>",
      "rawMarkdown": "If you are resizing in your training loop,  you need to resize ahead of time and store the 256x256 images.",
      "votes": null
    },
    {
      "id": "953175",
      "postDate": "07/31/2020 15:25:44",
      "content": "<p>Yes. Some original images are <code>4000x6000</code>. It takes our computers a lot of time to read these large files from disk and then resize them to <code>256x256</code>. Try training with a Kaggle dataset where images have already been resized to 256x256 <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164092\">here</a>.</p>",
      "rawMarkdown": "Yes. Some original images are `4000x6000`. It takes our computers a lot of time to read these large files from disk and then resize them to `256x256`. Try training with a Kaggle dataset where images have already been resized to 256x256 [here][1].\n\n[1]: https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164092",
      "votes": null
    },
    {
      "id": "954175",
      "postDate": "08/01/2020 13:20:00",
      "content": "<p>If you want to cut a lot of training time, I can only advice you to go for TFRecords + TPU. There is a giant gain!\nThe best starting point:\n<a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\">https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords</a> (huge thanks to <a href=\"/cdeotte\">@cdeotte</a>)\nIf you are not familiar with TPU and TFRecords, I recommend you take a look at this introduction, you will better understand that's going on in the notebook:\n<a href=\"https://codelabs.developers.google.com/codelabs/keras-flowers-data/#0\">https://codelabs.developers.google.com/codelabs/keras-flowers-data/#0</a>\nLastly, if  you want to use resnet based models with tf, take a look at this repository:\n<a href=\"https://github.com/qubvel/classification_models\">https://github.com/qubvel/classification_models</a></p>",
      "rawMarkdown": "If you want to cut a lot of training time, I can only advice you to go for TFRecords + TPU. There is a giant gain!\nThe best starting point:\nhttps://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords (huge thanks to @cdeotte)\nIf you are not familiar with TPU and TFRecords, I recommend you take a look at this introduction, you will better understand that's going on in the notebook:\nhttps://codelabs.developers.google.com/codelabs/keras-flowers-data/#0\nLastly, if  you want to use resnet based models with tf, take a look at this repository:\nhttps://github.com/qubvel/classification_models",
      "votes": null
    },
    {
      "id": "954462",
      "postDate": "08/01/2020 18:40:57",
      "content": "<p>One thing you should make sure of is that you're training with an accelerator, like a GPU or TPU. You can do so by going into your editor, clicking the three dots on the menu bar on the right, and selecting your accelerator.</p>",
      "rawMarkdown": "One thing you should make sure of is that you're training with an accelerator, like a GPU or TPU. You can do so by going into your editor, clicking the three dots on the menu bar on the right, and selecting your accelerator.",
      "votes": null
    },
    {
      "id": "954678",
      "postDate": "08/02/2020 01:57:02",
      "content": "<p>Great suggestion</p>",
      "rawMarkdown": "Great suggestion",
      "votes": null
    },
    {
      "id": "954857",
      "postDate": "08/02/2020 06:34:40",
      "content": "<p>Use TPU. It will take some minutes to train on 256 X 256 images.</p>",
      "rawMarkdown": "Use TPU. It will take some minutes to train on 256 X 256 images.",
      "votes": null
    },
    {
      "id": "955187",
      "postDate": "08/02/2020 12:26:25",
      "content": "<p>thanks to everyone i do the same i used the kernel haveing  256 image size.  but why its really slow when i resize it ont go it take about 2 hours for just one epoch with gpu </p>",
      "rawMarkdown": "thanks to everyone i do the same i used the kernel haveing  256 image size.  but why its really slow when i resize it ont go it take about 2 hours for just one epoch with gpu",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 953070,
      "author_name": "richardepstein",
      "author_url": "",
      "post_date": "07/31/2020 13:54:59",
      "content": "<p>If you are resizing in your training loop,  you need to resize ahead of time and store the 256x256 images. </p>",
      "votes": null,
      "replies": [
        {
          "id": 953175,
          "author_name": "cdeotte",
          "author_url": "",
          "post_date": "07/31/2020 15:25:44",
          "content": "<p>Yes. Some original images are <code>4000x6000</code>. It takes our computers a lot of time to read these large files from disk and then resize them to <code>256x256</code>. Try training with a Kaggle dataset where images have already been resized to 256x256 <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164092\">here</a>.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 954175,
      "author_name": "romainfabre",
      "author_url": "",
      "post_date": "08/01/2020 13:20:00",
      "content": "<p>If you want to cut a lot of training time, I can only advice you to go for TFRecords + TPU. There is a giant gain!\nThe best starting point:\n<a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\">https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords</a> (huge thanks to <a href=\"/cdeotte\">@cdeotte</a>)\nIf you are not familiar with TPU and TFRecords, I recommend you take a look at this introduction, you will better understand that's going on in the notebook:\n<a href=\"https://codelabs.developers.google.com/codelabs/keras-flowers-data/#0\">https://codelabs.developers.google.com/codelabs/keras-flowers-data/#0</a>\nLastly, if  you want to use resnet based models with tf, take a look at this repository:\n<a href=\"https://github.com/qubvel/classification_models\">https://github.com/qubvel/classification_models</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 954462,
      "author_name": "abhaykatoch",
      "author_url": "",
      "post_date": "08/01/2020 18:40:57",
      "content": "<p>One thing you should make sure of is that you're training with an accelerator, like a GPU or TPU. You can do so by going into your editor, clicking the three dots on the menu bar on the right, and selecting your accelerator.</p>",
      "votes": null,
      "replies": [
        {
          "id": 954678,
          "author_name": "cdeotte",
          "author_url": "",
          "post_date": "08/02/2020 01:57:02",
          "content": "<p>Great suggestion</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 954857,
      "author_name": "fireheart7",
      "author_url": "",
      "post_date": "08/02/2020 06:34:40",
      "content": "<p>Use TPU. It will take some minutes to train on 256 X 256 images.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 955187,
      "author_name": "jainji",
      "author_url": "",
      "post_date": "08/02/2020 12:26:25",
      "content": "<p>thanks to everyone i do the same i used the kernel haveing  256 image size.  but why its really slow when i resize it ont go it take about 2 hours for just one epoch with gpu </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "953002": "i am using pytorch and make custome dataset and using jpeg folder to laod image and resize it to 256 *256 and using pretrained resnset32 but still each epoch time is 1 hrs 40 mins so what is problem let me know it stops me to even submit my first submission",
    "953070": "If you are resizing in your training loop,  you need to resize ahead of time and store the 256x256 images.",
    "953175": "Yes. Some original images are `4000x6000`. It takes our computers a lot of time to read these large files from disk and then resize them to `256x256`. Try training with a Kaggle dataset where images have already been resized to 256x256 [here][1].\n\n[1]: https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164092",
    "954175": "If you want to cut a lot of training time, I can only advice you to go for TFRecords + TPU. There is a giant gain!\nThe best starting point:\nhttps://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords (huge thanks to @cdeotte)\nIf you are not familiar with TPU and TFRecords, I recommend you take a look at this introduction, you will better understand that's going on in the notebook:\nhttps://codelabs.developers.google.com/codelabs/keras-flowers-data/#0\nLastly, if  you want to use resnet based models with tf, take a look at this repository:\nhttps://github.com/qubvel/classification_models",
    "954462": "One thing you should make sure of is that you're training with an accelerator, like a GPU or TPU. You can do so by going into your editor, clicking the three dots on the menu bar on the right, and selecting your accelerator.",
    "954678": "Great suggestion",
    "954857": "Use TPU. It will take some minutes to train on 256 X 256 images.",
    "955187": "thanks to everyone i do the same i used the kernel haveing  256 image size.  but why its really slow when i resize it ont go it take about 2 hours for just one epoch with gpu"
  },
  "source": "meta"
}