{
  "id": 475569,
  "title": "Using Lightning? Come and get 4X Training Speedup",
  "url": "/competitions/hms-harmful-brain-activity-classification/discussion/475569",
  "author_name": "Mohamed Eltayeb",
  "post_date": "2024-02-08T22:58:15.006000",
  "votes": 13,
  "comment_count": 0,
  "views": 0,
  "content": "<p>1- Turn on T4x2<br>\n2- Use mixed precision:<br>\n<code>trainer = pl.Trainer(max_epochs=4, precision='16-mixed')</code></p>\n<p><strong>Before</strong>:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2F9e44ef2ceedb3bbbb029a8d67e898dac%2FB.png?generation=1707428644049513&amp;alt=media\"></p>\n<p>Finished 5 Folds after: 4 hours 15 minutes<br>\nCV: 0.643</p>\n<p><strong>After</strong>:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2Ff2e69aa85ed1c197eb19f41930146de4%2FA.png?generation=1707428656351384&amp;alt=media\"></p>\n<p>Finished 5 Folds after: 1 hour<br>\nCV: 0.652</p>\n<p>Tested on modified version of: <a href=\"https://www.kaggle.com/code/crackle/efficientnetb0-pytorch-starter-lb-0-40/notebook\" target=\"_blank\">https://www.kaggle.com/code/crackle/efficientnetb0-pytorch-starter-lb-0-40/notebook</a></p>\n<p>I think it is possible to use this to finish all experiments then return this to original precision to get back full performance.</p>",
  "messages": [
    {
      "id": 2643570,
      "postDate": "2024-02-08T22:58:15.007Z",
      "content": "<p>1- Turn on T4x2<br>\n2- Use mixed precision:<br>\n<code>trainer = pl.Trainer(max_epochs=4, precision='16-mixed')</code></p>\n<p><strong>Before</strong>:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2F9e44ef2ceedb3bbbb029a8d67e898dac%2FB.png?generation=1707428644049513&amp;alt=media\"></p>\n<p>Finished 5 Folds after: 4 hours 15 minutes<br>\nCV: 0.643</p>\n<p><strong>After</strong>:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2Ff2e69aa85ed1c197eb19f41930146de4%2FA.png?generation=1707428656351384&amp;alt=media\"></p>\n<p>Finished 5 Folds after: 1 hour<br>\nCV: 0.652</p>\n<p>Tested on modified version of: <a href=\"https://www.kaggle.com/code/crackle/efficientnetb0-pytorch-starter-lb-0-40/notebook\" target=\"_blank\">https://www.kaggle.com/code/crackle/efficientnetb0-pytorch-starter-lb-0-40/notebook</a></p>\n<p>I think it is possible to use this to finish all experiments then return this to original precision to get back full performance.</p>",
      "rawMarkdown": "1- Turn on T4x2\n2- Use mixed precision:\n`trainer = pl.Trainer(max_epochs=4, precision='16-mixed')`\n\n**Before**:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2F9e44ef2ceedb3bbbb029a8d67e898dac%2FB.png?generation=1707428644049513&alt=media)\n\nFinished 5 Folds after: 4 hours 15 minutes\nCV: 0.643\n\n**After**:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2Ff2e69aa85ed1c197eb19f41930146de4%2FA.png?generation=1707428656351384&alt=media)\n\nFinished 5 Folds after: 1 hour\nCV: 0.652\n\nTested on modified version of: https://www.kaggle.com/code/crackle/efficientnetb0-pytorch-starter-lb-0-40/notebook\n\nI think it is possible to use this to finish all experiments then return this to original precision to get back full performance.",
      "votes": 13
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2643570": "1- Turn on T4x2\n2- Use mixed precision:\n`trainer = pl.Trainer(max_epochs=4, precision='16-mixed')`\n\n**Before**:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2F9e44ef2ceedb3bbbb029a8d67e898dac%2FB.png?generation=1707428644049513&alt=media)\n\nFinished 5 Folds after: 4 hours 15 minutes\nCV: 0.643\n\n**After**:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7311816%2Ff2e69aa85ed1c197eb19f41930146de4%2FA.png?generation=1707428656351384&alt=media)\n\nFinished 5 Folds after: 1 hour\nCV: 0.652\n\nTested on modified version of: https://www.kaggle.com/code/crackle/efficientnetb0-pytorch-starter-lb-0-40/notebook\n\nI think it is possible to use this to finish all experiments then return this to original precision to get back full performance."
  }
}