{
  "id": 205166,
  "title": "Why does custom loss function slow training ?",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/205166",
  "author_name": "",
  "post_date": "2020-12-18T19:33:19.114390700Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I have implemented custom loss in pytorch but it slow training by 4x. Am i doing something wrong or it is just normal ? </p>",
  "messages": [
    {
      "id": "1118155",
      "postDate": "12/18/2020 19:33:19",
      "content": "<p>I have implemented custom loss in pytorch but it slow training by 4x. Am i doing something wrong or it is just normal ? </p>",
      "rawMarkdown": "I have implemented custom loss in pytorch but it slow training by 4x. Am i doing something wrong or it is just normal ?",
      "votes": null
    },
    {
      "id": "1118589",
      "postDate": "12/19/2020 08:18:06",
      "content": "<p>Well, it depends how you custom loss function looks like and also what do you mean by slow.<br>\nSlow in the sense of an epoch takes more time, which denotes a computational expensive loss function where the option is to optimize the calculations (use faster libraries or approximation of functions which takes less time) or slow in the sense of needs more epochs to converge to the same result as other loss function. In the last case you can use different multiplicators or the components in the loss function or adjust the learning rate value and scheduling type</p>",
      "rawMarkdown": "Well, it depends how you custom loss function looks like and also what do you mean by slow.\nSlow in the sense of an epoch takes more time, which denotes a computational expensive loss function where the option is to optimize the calculations (use faster libraries or approximation of functions which takes less time) or slow in the sense of needs more epochs to converge to the same result as other loss function. In the last case you can use different multiplicators or the components in the loss function or adjust the learning rate value and scheduling type",
      "votes": null
    },
    {
      "id": "1119651",
      "postDate": "12/20/2020 09:01:41",
      "content": "<p>Lol.. It is slow in both way now i have seen.<br>\nMay be you can help i was using Gamblers loss for noisy label<br>\nMore on that <br>\n<a href=\"https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/205424\" target=\"_blank\">https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/205424</a></p>",
      "rawMarkdown": "Lol.. It is slow in both way now i have seen.\nMay be you can help i was using Gamblers loss for noisy label\nMore on that \nhttps://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/205424",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1118589,
      "author_name": "vladvdv",
      "author_url": "",
      "post_date": "12/19/2020 08:18:06",
      "content": "<p>Well, it depends how you custom loss function looks like and also what do you mean by slow.<br>\nSlow in the sense of an epoch takes more time, which denotes a computational expensive loss function where the option is to optimize the calculations (use faster libraries or approximation of functions which takes less time) or slow in the sense of needs more epochs to converge to the same result as other loss function. In the last case you can use different multiplicators or the components in the loss function or adjust the learning rate value and scheduling type</p>",
      "votes": null,
      "replies": [
        {
          "id": 1119651,
          "author_name": "rajanlagah",
          "author_url": "",
          "post_date": "12/20/2020 09:01:41",
          "content": "<p>Lol.. It is slow in both way now i have seen.<br>\nMay be you can help i was using Gamblers loss for noisy label<br>\nMore on that <br>\n<a href=\"https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/205424\" target=\"_blank\">https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/205424</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1118155": "I have implemented custom loss in pytorch but it slow training by 4x. Am i doing something wrong or it is just normal ?",
    "1118589": "Well, it depends how you custom loss function looks like and also what do you mean by slow.\nSlow in the sense of an epoch takes more time, which denotes a computational expensive loss function where the option is to optimize the calculations (use faster libraries or approximation of functions which takes less time) or slow in the sense of needs more epochs to converge to the same result as other loss function. In the last case you can use different multiplicators or the components in the loss function or adjust the learning rate value and scheduling type",
    "1119651": "Lol.. It is slow in both way now i have seen.\nMay be you can help i was using Gamblers loss for noisy label\nMore on that \nhttps://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/205424"
  },
  "source": "meta"
}