{
  "id": 286696,
  "title": "Internet access disabled",
  "url": "/competitions/sartorius-cell-instance-segmentation/discussion/286696",
  "author_name": "",
  "post_date": "2021-11-10T09:25:42.216489300Z",
  "votes": 5,
  "comment_count": 2,
  "views": 0,
  "content": "<p>In this competition, it is required to meet the condition that Internet access disabled.<br>\nAnd it seems that some of public notebooks use pretrained model or something.<br>\nHowever, I don't have much knowledge about this.<br>\nIs there any sources to learn about how to use pretrained model or use models of another notebook?</p>",
  "messages": [
    {
      "id": "1577654",
      "postDate": "11/10/2021 09:25:42",
      "content": "<p>In this competition, it is required to meet the condition that Internet access disabled.<br>\nAnd it seems that some of public notebooks use pretrained model or something.<br>\nHowever, I don't have much knowledge about this.<br>\nIs there any sources to learn about how to use pretrained model or use models of another notebook?</p>",
      "rawMarkdown": "In this competition, it is required to meet the condition that Internet access disabled.\nAnd it seems that some of public notebooks use pretrained model or something.\nHowever, I don't have much knowledge about this.\nIs there any sources to learn about how to use pretrained model or use models of another notebook?",
      "votes": null
    },
    {
      "id": "1577732",
      "postDate": "11/10/2021 10:57:27",
      "content": "<p>You may create a dataset with the pretrained model and load the model offline. To use models of other notebooks, you can simply add the notebook as a data source.</p>\n<p>The best source to learn more about this would be <a href=\"https://www.kaggle.com/docs/notebooks\" target=\"_blank\">Kaggle's notebook documentation</a> </p>",
      "rawMarkdown": "You may create a dataset with the pretrained model and load the model offline. To use models of other notebooks, you can simply add the notebook as a data source.\n\nThe best source to learn more about this would be [Kaggle's notebook documentation](https://www.kaggle.com/docs/notebooks)",
      "votes": null
    },
    {
      "id": "1578036",
      "postDate": "11/10/2021 15:17:43",
      "content": "<p>yeah, what <a href=\"https://www.kaggle.com/ther3venant\" target=\"_blank\">@ther3venant</a> said is right, in addition to that, sometimes people use a library, which downloads a model at the time of instantiating the model. In that case, you can download the wheel file and the model file and create a dataset out of it. and then do,</p>\n<pre><code>%%capture\n!pip install ../input/segmentation-models-wheels/efficientnet_pytorch-0.6.3-py3-none-any.whl\n</code></pre>\n<p>And, its a demo code though.</p>\n<pre><code>!mkdir -p /root/.cache/torch/hub/checkpoints/\n!cp ../input/pytorch-pretrained-image-models/resnet34.pth /root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth\n</code></pre>\n<blockquote>\n  <p>you will be able to see the directory while downloading the model, so replace that with <code>/root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth</code>.</p>\n</blockquote>",
      "rawMarkdown": "yeah, what @ther3venant said is right, in addition to that, sometimes people use a library, which downloads a model at the time of instantiating the model. In that case, you can download the wheel file and the model file and create a dataset out of it. and then do,\n\n```python\n%%capture\n!pip install ../input/segmentation-models-wheels/efficientnet_pytorch-0.6.3-py3-none-any.whl\n```\n\nAnd, its a demo code though.\n```python\n!mkdir -p /root/.cache/torch/hub/checkpoints/\n!cp ../input/pytorch-pretrained-image-models/resnet34.pth /root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth\n```\n\n> you will be able to see the directory while downloading the model, so replace that with `/root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth`.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1577732,
      "author_name": "ther3venant",
      "author_url": "",
      "post_date": "11/10/2021 10:57:27",
      "content": "<p>You may create a dataset with the pretrained model and load the model offline. To use models of other notebooks, you can simply add the notebook as a data source.</p>\n<p>The best source to learn more about this would be <a href=\"https://www.kaggle.com/docs/notebooks\" target=\"_blank\">Kaggle's notebook documentation</a> </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1578036,
      "author_name": "soumya9977",
      "author_url": "",
      "post_date": "11/10/2021 15:17:43",
      "content": "<p>yeah, what <a href=\"https://www.kaggle.com/ther3venant\" target=\"_blank\">@ther3venant</a> said is right, in addition to that, sometimes people use a library, which downloads a model at the time of instantiating the model. In that case, you can download the wheel file and the model file and create a dataset out of it. and then do,</p>\n<pre><code>%%capture\n!pip install ../input/segmentation-models-wheels/efficientnet_pytorch-0.6.3-py3-none-any.whl\n</code></pre>\n<p>And, its a demo code though.</p>\n<pre><code>!mkdir -p /root/.cache/torch/hub/checkpoints/\n!cp ../input/pytorch-pretrained-image-models/resnet34.pth /root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth\n</code></pre>\n<blockquote>\n  <p>you will be able to see the directory while downloading the model, so replace that with <code>/root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth</code>.</p>\n</blockquote>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1577654": "In this competition, it is required to meet the condition that Internet access disabled.\nAnd it seems that some of public notebooks use pretrained model or something.\nHowever, I don't have much knowledge about this.\nIs there any sources to learn about how to use pretrained model or use models of another notebook?",
    "1577732": "You may create a dataset with the pretrained model and load the model offline. To use models of other notebooks, you can simply add the notebook as a data source.\n\nThe best source to learn more about this would be [Kaggle's notebook documentation](https://www.kaggle.com/docs/notebooks)",
    "1578036": "yeah, what @ther3venant said is right, in addition to that, sometimes people use a library, which downloads a model at the time of instantiating the model. In that case, you can download the wheel file and the model file and create a dataset out of it. and then do,\n\n```python\n%%capture\n!pip install ../input/segmentation-models-wheels/efficientnet_pytorch-0.6.3-py3-none-any.whl\n```\n\nAnd, its a demo code though.\n```python\n!mkdir -p /root/.cache/torch/hub/checkpoints/\n!cp ../input/pytorch-pretrained-image-models/resnet34.pth /root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth\n```\n\n> you will be able to see the directory while downloading the model, so replace that with `/root/.cache/torch/hub/checkpoints/resnet34-333f7ec4.pth`."
  },
  "source": "meta"
}