{
  "id": 203547,
  "title": "How to speed up inference?",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/203547",
  "author_name": "",
  "post_date": "2020-12-15T17:01:21.119928700Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I found that 5fold efficientnet-b4 wiith 8TTA needs almost 2 hours for inference!<br>\nEnv:GPU pytorch</p>\n<p>Could you share some great suggestions for speeding up inference…</p>",
  "messages": [
    {
      "id": "1113758",
      "postDate": "12/15/2020 17:01:21",
      "content": "<p>I found that 5fold efficientnet-b4 wiith 8TTA needs almost 2 hours for inference!<br>\nEnv:GPU pytorch</p>\n<p>Could you share some great suggestions for speeding up inference…</p>",
      "rawMarkdown": "I found that 5fold efficientnet-b4 wiith 8TTA needs almost 2 hours for inference!\nEnv:GPU pytorch\n\nCould you share some great suggestions for speeding up inference...",
      "votes": null
    },
    {
      "id": "1115180",
      "postDate": "12/16/2020 04:14:35",
      "content": "<p>Have you made sure the notebook you're using for submission is saved with GPU enabled in settings?</p>",
      "rawMarkdown": "Have you made sure the notebook you're using for submission is saved with GPU enabled in settings?",
      "votes": null
    },
    {
      "id": "1115589",
      "postDate": "12/16/2020 11:56:00",
      "content": "<p>Quick Ideas:</p>\n<ul>\n<li>Use already resized images as dataset</li>\n<li>Use <code>torch.no_grad()</code> during inference</li>\n<li>Increase the <code>num_workers</code> in your DataLoader</li>\n</ul>",
      "rawMarkdown": "Quick Ideas:\n\n- Use already resized images as dataset\n- Use `torch.no_grad()` during inference\n- Increase the `num_workers` in your DataLoader",
      "votes": null
    },
    {
      "id": "1115743",
      "postDate": "12/16/2020 14:31:00",
      "content": "<p>Also, pinning memory is helpful. See <a href=\"https://pytorch.org/docs/stable/data.html#memory-pinning\" target=\"_blank\">https://pytorch.org/docs/stable/data.html#memory-pinning</a></p>",
      "rawMarkdown": "Also, pinning memory is helpful. See https://pytorch.org/docs/stable/data.html#memory-pinning",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1115180,
      "author_name": "cliffplaysdrums",
      "author_url": "",
      "post_date": "12/16/2020 04:14:35",
      "content": "<p>Have you made sure the notebook you're using for submission is saved with GPU enabled in settings?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1115589,
      "author_name": "aliabdin1",
      "author_url": "",
      "post_date": "12/16/2020 11:56:00",
      "content": "<p>Quick Ideas:</p>\n<ul>\n<li>Use already resized images as dataset</li>\n<li>Use <code>torch.no_grad()</code> during inference</li>\n<li>Increase the <code>num_workers</code> in your DataLoader</li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1115743,
      "author_name": "cliffplaysdrums",
      "author_url": "",
      "post_date": "12/16/2020 14:31:00",
      "content": "<p>Also, pinning memory is helpful. See <a href=\"https://pytorch.org/docs/stable/data.html#memory-pinning\" target=\"_blank\">https://pytorch.org/docs/stable/data.html#memory-pinning</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1113758": "I found that 5fold efficientnet-b4 wiith 8TTA needs almost 2 hours for inference!\nEnv:GPU pytorch\n\nCould you share some great suggestions for speeding up inference...",
    "1115180": "Have you made sure the notebook you're using for submission is saved with GPU enabled in settings?",
    "1115589": "Quick Ideas:\n\n- Use already resized images as dataset\n- Use `torch.no_grad()` during inference\n- Increase the `num_workers` in your DataLoader",
    "1115743": "Also, pinning memory is helpful. See https://pytorch.org/docs/stable/data.html#memory-pinning"
  },
  "source": "meta"
}