{
  "id": 229167,
  "title": "Can We use pre-trained model",
  "url": "/competitions/hotel-id-2021-fgvc8/discussion/229167",
  "author_name": "",
  "post_date": "2021-03-28T17:48:38.712400600Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I'm beginner of kaggle competition. Could you tell me that we can use pre-trained model or not.<br>\nRule says the following.</p>\n<blockquote>\n  <p>Internet access disabled<br>\n  Pre-trained models are allowed</p>\n</blockquote>\n<p>But when we use pre-trained model , pre-trained weights will be downloaded. But then if the Internet  can`t be used, the error will happen.</p>\n<p>Please tell me about this matter.</p>",
  "messages": [
    {
      "id": "1255348",
      "postDate": "03/28/2021 17:48:38",
      "content": "<p>I'm beginner of kaggle competition. Could you tell me that we can use pre-trained model or not.<br>\nRule says the following.</p>\n<blockquote>\n  <p>Internet access disabled<br>\n  Pre-trained models are allowed</p>\n</blockquote>\n<p>But when we use pre-trained model , pre-trained weights will be downloaded. But then if the Internet  can`t be used, the error will happen.</p>\n<p>Please tell me about this matter.</p>",
      "rawMarkdown": "I'm beginner of kaggle competition. Could you tell me that we can use pre-trained model or not.\nRule says the following.\n\n> Internet access disabled\nPre-trained models are allowed\n\nBut when we use pre-trained model , pre-trained weights will be downloaded. But then if the Internet  can`t be used, the error will happen.\n\nPlease tell me about this matter.",
      "votes": null
    },
    {
      "id": "1255765",
      "postDate": "03/29/2021 07:07:39",
      "content": "<p>One way to use a pre-trained model here is to create separate notebooks for training and inference. In the training notebook the internet will be enabled. In the inference notebook the internet will be disabled.</p>\n<p>The process is as follows:</p>\n<ol>\n<li>Train the model with the internet enabled and save the trained model.</li>\n<li>Create an inference notebook. Disable the internet. Load the trained model. Make predictions and submit the predictions. </li>\n</ol>\n<p>There are two ways to load the trained model into the inference notebook:</p>\n<p>a) Click the <code>+ add data</code>  button in the top right corner of the notebook. Then find and select the notebook where the model was trained. The output files (incl. the trained model) can then be loaded into the inference notebook using the following path:<br>\n<code>path_to_model = ’../input/the-training-notebook/the-model-file’</code></p>\n<p>b) The second way is to put the trained model into a new dataset, then import that dataset into the inference notebook using the  <code>+ add data</code>  button.</p>",
      "rawMarkdown": "One way to use a pre-trained model here is to create separate notebooks for training and inference. In the training notebook the internet will be enabled. In the inference notebook the internet will be disabled.\n\nThe process is as follows:\n\n1. Train the model with the internet enabled and save the trained model.\n2. Create an inference notebook. Disable the internet. Load the trained model. Make predictions and submit the predictions. \n\nThere are two ways to load the trained model into the inference notebook:\n\na) Click the ` + add data`  button in the top right corner of the notebook. Then find and select the notebook where the model was trained. The output files (incl. the trained model) can then be loaded into the inference notebook using the following path:\n`path_to_model = ’../input/the-training-notebook/the-model-file’`\n\nb) The second way is to put the trained model into a new dataset, then import that dataset into the inference notebook using the  `+ add data`  button.",
      "votes": null
    },
    {
      "id": "1255990",
      "postDate": "03/29/2021 12:58:24",
      "content": "<p>Thanks for your your explanations! I didn't know that training and inference notebook were separated in  deferent books  with this rule. I'll try it as soon as I can.</p>",
      "rawMarkdown": "Thanks for your your explanations! I didn't know that training and inference notebook were separated in  deferent books  with this rule. I'll try it as soon as I can.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1255765,
      "author_name": "vbookshelf",
      "author_url": "",
      "post_date": "03/29/2021 07:07:39",
      "content": "<p>One way to use a pre-trained model here is to create separate notebooks for training and inference. In the training notebook the internet will be enabled. In the inference notebook the internet will be disabled.</p>\n<p>The process is as follows:</p>\n<ol>\n<li>Train the model with the internet enabled and save the trained model.</li>\n<li>Create an inference notebook. Disable the internet. Load the trained model. Make predictions and submit the predictions. </li>\n</ol>\n<p>There are two ways to load the trained model into the inference notebook:</p>\n<p>a) Click the <code>+ add data</code>  button in the top right corner of the notebook. Then find and select the notebook where the model was trained. The output files (incl. the trained model) can then be loaded into the inference notebook using the following path:<br>\n<code>path_to_model = ’../input/the-training-notebook/the-model-file’</code></p>\n<p>b) The second way is to put the trained model into a new dataset, then import that dataset into the inference notebook using the  <code>+ add data</code>  button.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1255990,
          "author_name": "yukicat",
          "author_url": "",
          "post_date": "03/29/2021 12:58:24",
          "content": "<p>Thanks for your your explanations! I didn't know that training and inference notebook were separated in  deferent books  with this rule. I'll try it as soon as I can.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1255348": "I'm beginner of kaggle competition. Could you tell me that we can use pre-trained model or not.\nRule says the following.\n\n> Internet access disabled\nPre-trained models are allowed\n\nBut when we use pre-trained model , pre-trained weights will be downloaded. But then if the Internet  can`t be used, the error will happen.\n\nPlease tell me about this matter.",
    "1255765": "One way to use a pre-trained model here is to create separate notebooks for training and inference. In the training notebook the internet will be enabled. In the inference notebook the internet will be disabled.\n\nThe process is as follows:\n\n1. Train the model with the internet enabled and save the trained model.\n2. Create an inference notebook. Disable the internet. Load the trained model. Make predictions and submit the predictions. \n\nThere are two ways to load the trained model into the inference notebook:\n\na) Click the ` + add data`  button in the top right corner of the notebook. Then find and select the notebook where the model was trained. The output files (incl. the trained model) can then be loaded into the inference notebook using the following path:\n`path_to_model = ’../input/the-training-notebook/the-model-file’`\n\nb) The second way is to put the trained model into a new dataset, then import that dataset into the inference notebook using the  `+ add data`  button.",
    "1255990": "Thanks for your your explanations! I didn't know that training and inference notebook were separated in  deferent books  with this rule. I'll try it as soon as I can."
  },
  "source": "meta"
}