{
  "id": 159491,
  "title": "Correct way to import trained weights",
  "url": "/competitions/global-wheat-detection/discussion/159491",
  "author_name": "Ayca Idil",
  "post_date": "2020-06-17T15:58:33.887000",
  "votes": 0,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hey everyone,</p>\n\n<p>I'm new to Kaggle and competitions and I would like to train a model locally, since the training will take 20+ hours. So if I would like to use that trained model for the global wheat detection competition, I was thinking I could do the following:</p>\n\n<p>1) Upload the training scripts + trained weights to github\n2) Create a kaggle 'training' notebook with internet on, which will define the model, load the weights from github, and save the model weights as output on kaggle\n3) Create a second 'test/submission' notebook with internet off, which will get the trained weights (as saved by the previous notebook) as input, do the test set predictions and write to submission.csv</p>\n\n<p>Is this at all allowed or should I run all the training also on a kaggle notebook with the 6 hour time limit as well? The latter seems a little strange because I guess I can have a series of notebooks which loads the weights computed by the previous one and resumes training serially (so e.g. 4 consecutive notebooks if I need 24 h for training).</p>\n\n<p>So what is the correct way to externally train a model and then import the weights for this competition?</p>\n\n<p>Thanks in advance for your help! :)</p>",
  "messages": [
    {
      "id": 890627,
      "postDate": "2020-06-17T15:58:33.887Z",
      "content": "<p>Hey everyone,</p>\n\n<p>I'm new to Kaggle and competitions and I would like to train a model locally, since the training will take 20+ hours. So if I would like to use that trained model for the global wheat detection competition, I was thinking I could do the following:</p>\n\n<p>1) Upload the training scripts + trained weights to github\n2) Create a kaggle 'training' notebook with internet on, which will define the model, load the weights from github, and save the model weights as output on kaggle\n3) Create a second 'test/submission' notebook with internet off, which will get the trained weights (as saved by the previous notebook) as input, do the test set predictions and write to submission.csv</p>\n\n<p>Is this at all allowed or should I run all the training also on a kaggle notebook with the 6 hour time limit as well? The latter seems a little strange because I guess I can have a series of notebooks which loads the weights computed by the previous one and resumes training serially (so e.g. 4 consecutive notebooks if I need 24 h for training).</p>\n\n<p>So what is the correct way to externally train a model and then import the weights for this competition?</p>\n\n<p>Thanks in advance for your help! :)</p>",
      "rawMarkdown": "Hey everyone,\n\nI'm new to Kaggle and competitions and I would like to train a model locally, since the training will take 20+ hours. So if I would like to use that trained model for the global wheat detection competition, I was thinking I could do the following:\n\n1) Upload the training scripts + trained weights to github\n2) Create a kaggle 'training' notebook with internet on, which will define the model, load the weights from github, and save the model weights as output on kaggle\n3) Create a second 'test/submission' notebook with internet off, which will get the trained weights (as saved by the previous notebook) as input, do the test set predictions and write to submission.csv\n\nIs this at all allowed or should I run all the training also on a kaggle notebook with the 6 hour time limit as well? The latter seems a little strange because I guess I can have a series of notebooks which loads the weights computed by the previous one and resumes training serially (so e.g. 4 consecutive notebooks if I need 24 h for training).\n\nSo what is the correct way to externally train a model and then import the weights for this competition?\n\nThanks in advance for your help! :)"
    },
    {
      "id": 898313,
      "postDate": "2020-06-23T12:44:50.640Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 898313,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-06-23T12:44:50.640000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "890627": "Hey everyone,\n\nI'm new to Kaggle and competitions and I would like to train a model locally, since the training will take 20+ hours. So if I would like to use that trained model for the global wheat detection competition, I was thinking I could do the following:\n\n1) Upload the training scripts + trained weights to github\n2) Create a kaggle 'training' notebook with internet on, which will define the model, load the weights from github, and save the model weights as output on kaggle\n3) Create a second 'test/submission' notebook with internet off, which will get the trained weights (as saved by the previous notebook) as input, do the test set predictions and write to submission.csv\n\nIs this at all allowed or should I run all the training also on a kaggle notebook with the 6 hour time limit as well? The latter seems a little strange because I guess I can have a series of notebooks which loads the weights computed by the previous one and resumes training serially (so e.g. 4 consecutive notebooks if I need 24 h for training).\n\nSo what is the correct way to externally train a model and then import the weights for this competition?\n\nThanks in advance for your help! :)",
    "898313": ""
  }
}