{
  "id": 216461,
  "title": "Training and Inference notebooks",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/216461",
  "author_name": "",
  "post_date": "2021-02-02T20:48:49.382629900Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I have created 2 very basic notebooks for someone trying to understand the process of training and inference along with how to submit your csv file using bare minimum code. I have not even used cross validation in order to keep it very simple.</p>\n<p>Purpose of both notebooks is : </p>\n<ol>\n<li>In training we will train the model and save the model.</li>\n<li>In inference we will load the saved model used in training and make prediction on test data and generalise for any amount of test data present and finally submit our result for getting score.</li>\n</ol>\n<p>The links of the notebook are:-</p>\n<ol>\n<li><a href=\"https://www.kaggle.com/vickygoyal/training\" target=\"_blank\">Training</a></li>\n<li><a href=\"https://www.kaggle.com/vickygoyal/inference\" target=\"_blank\">Inference</a></li>\n</ol>\n<p>I have used 5 epochs training Resnet50 to keep things simple but still it gives you a score of 68%. U can try increasing epochs say may be 10 or/and dimension may be 256 to see the change in accuracy.</p>\n<p>The following you can try to add on top of the training for increased accuracy:-</p>\n<ol>\n<li>How to use cross validation and folds</li>\n<li>How to use tpu</li>\n<li>How to play around with different models, batch size, dimension of image,epochs, loss, adding old data, etc</li>\n<li>Adding augmentations to avoid overfitting.</li>\n</ol>\n<p>Please \"don't\" forget to upvote in case it is helpful</p>",
  "messages": [
    {
      "id": "1183238",
      "postDate": "02/02/2021 20:48:49",
      "content": "<p>I have created 2 very basic notebooks for someone trying to understand the process of training and inference along with how to submit your csv file using bare minimum code. I have not even used cross validation in order to keep it very simple.</p>\n<p>Purpose of both notebooks is : </p>\n<ol>\n<li>In training we will train the model and save the model.</li>\n<li>In inference we will load the saved model used in training and make prediction on test data and generalise for any amount of test data present and finally submit our result for getting score.</li>\n</ol>\n<p>The links of the notebook are:-</p>\n<ol>\n<li><a href=\"https://www.kaggle.com/vickygoyal/training\" target=\"_blank\">Training</a></li>\n<li><a href=\"https://www.kaggle.com/vickygoyal/inference\" target=\"_blank\">Inference</a></li>\n</ol>\n<p>I have used 5 epochs training Resnet50 to keep things simple but still it gives you a score of 68%. U can try increasing epochs say may be 10 or/and dimension may be 256 to see the change in accuracy.</p>\n<p>The following you can try to add on top of the training for increased accuracy:-</p>\n<ol>\n<li>How to use cross validation and folds</li>\n<li>How to use tpu</li>\n<li>How to play around with different models, batch size, dimension of image,epochs, loss, adding old data, etc</li>\n<li>Adding augmentations to avoid overfitting.</li>\n</ol>\n<p>Please \"don't\" forget to upvote in case it is helpful</p>",
      "rawMarkdown": "I have created 2 very basic notebooks for someone trying to understand the process of training and inference along with how to submit your csv file using bare minimum code. I have not even used cross validation in order to keep it very simple.\n\nPurpose of both notebooks is : \n1. In training we will train the model and save the model.\n2. In inference we will load the saved model used in training and make prediction on test data and generalise for any amount of test data present and finally submit our result for getting score.\n\nThe links of the notebook are:-\n1. [Training](https://www.kaggle.com/vickygoyal/training)\n2. [Inference](https://www.kaggle.com/vickygoyal/inference)\n\n\nI have used 5 epochs training Resnet50 to keep things simple but still it gives you a score of 68%. U can try increasing epochs say may be 10 or/and dimension may be 256 to see the change in accuracy.\n\n\nThe following you can try to add on top of the training for increased accuracy:-\n1. How to use cross validation and folds\n2. How to use tpu\n3. How to play around with different models, batch size, dimension of image,epochs, loss, adding old data, etc\n4. Adding augmentations to avoid overfitting.\n\nPlease \"don't\" forget to upvote in case it is helpful",
      "votes": null
    },
    {
      "id": "1183284",
      "postDate": "02/02/2021 21:42:56",
      "content": "<p>Hi<br>\nOn 2. - use <a href=\"https://www.kaggle.com/docs/tpu#tpu6\" target=\"_blank\">https://www.kaggle.com/docs/tpu#tpu6</a> - Chapter \"TPUs in Code Competitions\" (save .h5 model - make dataset - etc..)</p>",
      "rawMarkdown": "Hi\nOn 2. - use https://www.kaggle.com/docs/tpu#tpu6 - Chapter \"TPUs in Code Competitions\" (save .h5 model - make dataset - etc..)",
      "votes": null
    },
    {
      "id": "1183291",
      "postDate": "02/02/2021 21:51:27",
      "content": "<p>I am using TPU only. These notebooks are for someone who is a beginner/started using kaggle/first submission and tpu might be a little bit too much to start with.</p>",
      "rawMarkdown": "I am using TPU only. These notebooks are for someone who is a beginner/started using kaggle/first submission and tpu might be a little bit too much to start with.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1183284,
      "author_name": "izotov",
      "author_url": "",
      "post_date": "02/02/2021 21:42:56",
      "content": "<p>Hi<br>\nOn 2. - use <a href=\"https://www.kaggle.com/docs/tpu#tpu6\" target=\"_blank\">https://www.kaggle.com/docs/tpu#tpu6</a> - Chapter \"TPUs in Code Competitions\" (save .h5 model - make dataset - etc..)</p>",
      "votes": null,
      "replies": [
        {
          "id": 1183291,
          "author_name": "vickygoyal",
          "author_url": "",
          "post_date": "02/02/2021 21:51:27",
          "content": "<p>I am using TPU only. These notebooks are for someone who is a beginner/started using kaggle/first submission and tpu might be a little bit too much to start with.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1183238": "I have created 2 very basic notebooks for someone trying to understand the process of training and inference along with how to submit your csv file using bare minimum code. I have not even used cross validation in order to keep it very simple.\n\nPurpose of both notebooks is : \n1. In training we will train the model and save the model.\n2. In inference we will load the saved model used in training and make prediction on test data and generalise for any amount of test data present and finally submit our result for getting score.\n\nThe links of the notebook are:-\n1. [Training](https://www.kaggle.com/vickygoyal/training)\n2. [Inference](https://www.kaggle.com/vickygoyal/inference)\n\n\nI have used 5 epochs training Resnet50 to keep things simple but still it gives you a score of 68%. U can try increasing epochs say may be 10 or/and dimension may be 256 to see the change in accuracy.\n\n\nThe following you can try to add on top of the training for increased accuracy:-\n1. How to use cross validation and folds\n2. How to use tpu\n3. How to play around with different models, batch size, dimension of image,epochs, loss, adding old data, etc\n4. Adding augmentations to avoid overfitting.\n\nPlease \"don't\" forget to upvote in case it is helpful",
    "1183284": "Hi\nOn 2. - use https://www.kaggle.com/docs/tpu#tpu6 - Chapter \"TPUs in Code Competitions\" (save .h5 model - make dataset - etc..)",
    "1183291": "I am using TPU only. These notebooks are for someone who is a beginner/started using kaggle/first submission and tpu might be a little bit too much to start with."
  },
  "source": "meta"
}