{
  "id": 169504,
  "title": "Batch form of affine augmentations in Tensor Flow",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/169504",
  "author_name": "Alexey Pronin",
  "post_date": "2020-07-24T04:33:09.374000",
  "votes": 6,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Just wanted to let everyone know that I have updated my data augmentation kernel:</p>\n\n<p><a href=\"https://www.kaggle.com/graf10a/siim-data-augmentation-in-tf-hair-batch-affine\">SIIM: Data Augmentation in TF: Hair + Batch Affine</a></p>\n\n<p>Now it includes the batch version of <a href=\"https://www.kaggle.com/cdeotte/rotation-augmentation-gpu-tpu-0-96\">Chris Deotte's affine augmentation</a> using the approach from <a href=\"https://www.kaggle.com/yihdarshieh/make-chris-deotte-s-data-augmentation-faster\">this great kernel</a> by <a href=\"https://www.kaggle.com/yihdarshieh\">Yih-Dar SHIEH</a> (this is <em>in addition</em> to advanced hair augmentation included in the earlier versions of the kernel). </p>\n\n<h2>Motivation</h2>\n\n<p>Performing data augmentation on batches instead of individual images can significantly speed up your training process because with batches many computations can be done in parallel. The net time gain depends on multiple factors such as the amount of data you are processing and the exact model you are using. It is especially noticeable on Colab -- after I switched to batches, I observed  the decrease in training time of about 20 seconds per epoch (B3, external data).  It might not look very impressive but think about it: with 30 epochs in each of 5 folds it means that you can save 30x5x20 = 3000 seconds in total. This saved time can be used to train more models, to try more ideas, etc. </p>\n\n<p>Enjoy!</p>",
  "messages": [
    {
      "id": 942947,
      "postDate": "2020-07-24T04:33:09.373Z",
      "content": "<p>Just wanted to let everyone know that I have updated my data augmentation kernel:</p>\n\n<p><a href=\"https://www.kaggle.com/graf10a/siim-data-augmentation-in-tf-hair-batch-affine\">SIIM: Data Augmentation in TF: Hair + Batch Affine</a></p>\n\n<p>Now it includes the batch version of <a href=\"https://www.kaggle.com/cdeotte/rotation-augmentation-gpu-tpu-0-96\">Chris Deotte's affine augmentation</a> using the approach from <a href=\"https://www.kaggle.com/yihdarshieh/make-chris-deotte-s-data-augmentation-faster\">this great kernel</a> by <a href=\"https://www.kaggle.com/yihdarshieh\">Yih-Dar SHIEH</a> (this is <em>in addition</em> to advanced hair augmentation included in the earlier versions of the kernel). </p>\n\n<h2>Motivation</h2>\n\n<p>Performing data augmentation on batches instead of individual images can significantly speed up your training process because with batches many computations can be done in parallel. The net time gain depends on multiple factors such as the amount of data you are processing and the exact model you are using. It is especially noticeable on Colab -- after I switched to batches, I observed  the decrease in training time of about 20 seconds per epoch (B3, external data).  It might not look very impressive but think about it: with 30 epochs in each of 5 folds it means that you can save 30x5x20 = 3000 seconds in total. This saved time can be used to train more models, to try more ideas, etc. </p>\n\n<p>Enjoy!</p>",
      "rawMarkdown": "Just wanted to let everyone know that I have updated my data augmentation kernel:\n\n[SIIM: Data Augmentation in TF: Hair + Batch Affine](https://www.kaggle.com/graf10a/siim-data-augmentation-in-tf-hair-batch-affine)\n\nNow it includes the batch version of [Chris Deotte's affine augmentation](https://www.kaggle.com/cdeotte/rotation-augmentation-gpu-tpu-0-96) using the approach from [this great kernel](https://www.kaggle.com/yihdarshieh/make-chris-deotte-s-data-augmentation-faster) by [Yih-Dar SHIEH](https://www.kaggle.com/yihdarshieh) (this is *in addition* to advanced hair augmentation included in the earlier versions of the kernel). \n\n## Motivation\n\nPerforming data augmentation on batches instead of individual images can significantly speed up your training process because with batches many computations can be done in parallel. The net time gain depends on multiple factors such as the amount of data you are processing and the exact model you are using. It is especially noticeable on Colab -- after I switched to batches, I observed  the decrease in training time of about 20 seconds per epoch (B3, external data).  It might not look very impressive but think about it: with 30 epochs in each of 5 folds it means that you can save 30x5x20 = 3000 seconds in total. This saved time can be used to train more models, to try more ideas, etc. \n\nEnjoy!",
      "votes": 6
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "942947": "Just wanted to let everyone know that I have updated my data augmentation kernel:\n\n[SIIM: Data Augmentation in TF: Hair + Batch Affine](https://www.kaggle.com/graf10a/siim-data-augmentation-in-tf-hair-batch-affine)\n\nNow it includes the batch version of [Chris Deotte's affine augmentation](https://www.kaggle.com/cdeotte/rotation-augmentation-gpu-tpu-0-96) using the approach from [this great kernel](https://www.kaggle.com/yihdarshieh/make-chris-deotte-s-data-augmentation-faster) by [Yih-Dar SHIEH](https://www.kaggle.com/yihdarshieh) (this is *in addition* to advanced hair augmentation included in the earlier versions of the kernel). \n\n## Motivation\n\nPerforming data augmentation on batches instead of individual images can significantly speed up your training process because with batches many computations can be done in parallel. The net time gain depends on multiple factors such as the amount of data you are processing and the exact model you are using. It is especially noticeable on Colab -- after I switched to batches, I observed  the decrease in training time of about 20 seconds per epoch (B3, external data).  It might not look very impressive but think about it: with 30 epochs in each of 5 folds it means that you can save 30x5x20 = 3000 seconds in total. This saved time can be used to train more models, to try more ideas, etc. \n\nEnjoy!"
  }
}