{
  "id": 215951,
  "title": "helpful tip for inference ",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/215951",
  "author_name": "",
  "post_date": "2021-02-01T02:19:38.832456200Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>For those who are using Tensorflow for inference, Use model.predict_on_batch() instead of model.predict(). Also after every loop use K.clear_session(). Earlier my GPU usage while inference was 25 - 30 percent but with this  my GPU usage is around 45 - 55 percent. Gives me  2x speedup </p>",
  "messages": [
    {
      "id": "1179943",
      "postDate": "02/01/2021 02:19:38",
      "content": "<p>For those who are using Tensorflow for inference, Use model.predict_on_batch() instead of model.predict(). Also after every loop use K.clear_session(). Earlier my GPU usage while inference was 25 - 30 percent but with this  my GPU usage is around 45 - 55 percent. Gives me  2x speedup </p>",
      "rawMarkdown": "For those who are using Tensorflow for inference, Use model.predict_on_batch() instead of model.predict(). Also after every loop use K.clear_session(). Earlier my GPU usage while inference was 25 - 30 percent but with this  my GPU usage is around 45 - 55 percent. Gives me  2x speedup",
      "votes": null
    },
    {
      "id": "1180722",
      "postDate": "02/01/2021 12:38:54",
      "content": "<p>Thank you will try it out, the predict_on batch, does it make a difference?</p>",
      "rawMarkdown": "Thank you will try it out, the predict_on batch, does it make a difference?",
      "votes": null
    },
    {
      "id": "1180908",
      "postDate": "02/01/2021 14:32:01",
      "content": "<p>Yes it does by a lot</p>",
      "rawMarkdown": "Yes it does by a lot",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1180722,
      "author_name": "mohneesh7",
      "author_url": "",
      "post_date": "02/01/2021 12:38:54",
      "content": "<p>Thank you will try it out, the predict_on batch, does it make a difference?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1180908,
          "author_name": "mithilsalunkhe",
          "author_url": "",
          "post_date": "02/01/2021 14:32:01",
          "content": "<p>Yes it does by a lot</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1179943": "For those who are using Tensorflow for inference, Use model.predict_on_batch() instead of model.predict(). Also after every loop use K.clear_session(). Earlier my GPU usage while inference was 25 - 30 percent but with this  my GPU usage is around 45 - 55 percent. Gives me  2x speedup",
    "1180722": "Thank you will try it out, the predict_on batch, does it make a difference?",
    "1180908": "Yes it does by a lot"
  },
  "source": "meta"
}