{
  "id": 189466,
  "title": "Internet use and pre trained models",
  "url": "/competitions/rsna-str-pulmonary-embolism-detection/discussion/189466",
  "author_name": "Jayasuriya Senthilvelan",
  "post_date": "2020-10-07T17:12:11.112000",
  "votes": 1,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hi, <br>\nThe guidelines say that we can use pre trained models (3rd party) in our submission. In my code, in order to use a pre trained model, I have to clone it from its GitHub repo. When I restart the kernel however, the notebook doesn't seem to remember the cloned files, so I have to re-download using the internet</p>\n<p>Will this pose an issue during submission? How do I get the downloaded repo to persist?</p>\n<p>Thanks,<br>\nJay</p>",
  "messages": [
    {
      "id": 1041290,
      "postDate": "2020-10-07T17:12:11.113Z",
      "content": "<p>Hi, <br>\nThe guidelines say that we can use pre trained models (3rd party) in our submission. In my code, in order to use a pre trained model, I have to clone it from its GitHub repo. When I restart the kernel however, the notebook doesn't seem to remember the cloned files, so I have to re-download using the internet</p>\n<p>Will this pose an issue during submission? How do I get the downloaded repo to persist?</p>\n<p>Thanks,<br>\nJay</p>",
      "rawMarkdown": "Hi, \nThe guidelines say that we can use pre trained models (3rd party) in our submission. In my code, in order to use a pre trained model, I have to clone it from its GitHub repo. When I restart the kernel however, the notebook doesn't seem to remember the cloned files, so I have to re-download using the internet\n\nWill this pose an issue during submission? How do I get the downloaded repo to persist?\n\nThanks,\nJay",
      "votes": 1
    },
    {
      "id": 1041455,
      "postDate": "2020-10-07T18:45:00.450Z",
      "content": "<p>What dataset do I attach the weights to? Can I save the weights and model in HDF5 format and load model with Keras?</p>",
      "rawMarkdown": "What dataset do I attach the weights to? Can I save the weights and model in HDF5 format and load model with Keras?",
      "replies": [
        {
          "id": 1041465,
          "postDate": "2020-10-07T18:52:07.840Z",
          "content": "<p>You create a new dataset and upload the weights to it, eg. as a HDF5 file saved by Keras. You can also create a dataset from the output of a notebook if you want to do your training here on Kaggle.</p>\n<p>You can also update your dataset with new weights later if you retrain your model, and it will be used the next time to your run your submission notebook. If you used a notebook to create the weights in the first place, you can update the dataset from that.</p>",
          "rawMarkdown": "You create a new dataset and upload the weights to it, eg. as a HDF5 file saved by Keras. You can also create a dataset from the output of a notebook if you want to do your training here on Kaggle.\n\nYou can also update your dataset with new weights later if you retrain your model, and it will be used the next time to your run your submission notebook. If you used a notebook to create the weights in the first place, you can update the dataset from that.",
          "votes": 1
        },
        {
          "id": 1041466,
          "postDate": "2020-10-07T18:52:33.613Z",
          "content": "<p>Yes.</p>\n<p>Train<br>\nSave model/weights with keras.<br>\nCreate a personal dataset. <br>\nCopy the model to it. <br>\nAttach the dataset to your notebook. <br>\nLoad the model from the dataset.<br>\nPreprocess and inference the test data</p>",
          "rawMarkdown": "Yes.\n\nTrain\nSave model/weights with keras.\nCreate a personal dataset. \nCopy the model to it. \nAttach the dataset to your notebook. \nLoad the model from the dataset.\nPreprocess and inference the test data",
          "votes": 1
        }
      ]
    },
    {
      "id": 1041396,
      "postDate": "2020-10-07T18:06:00.477Z",
      "content": "<p>And about submission -- remember that you can submit only inference kernel, i.e. kernel without any training procedure. You'll have to train your own model, add its weights to the dataset and attach that dataset to your inference kernel to do predictions.</p>",
      "rawMarkdown": "And about submission -- remember that you can submit only inference kernel, i.e. kernel without any training procedure. You'll have to train your own model, add its weights to the dataset and attach that dataset to your inference kernel to do predictions."
    },
    {
      "id": 1041334,
      "postDate": "2020-10-07T17:31:01.493Z",
      "content": "<p>Create a dataset with your pre-trained model and attach it to your notebook. </p>",
      "rawMarkdown": "Create a dataset with your pre-trained model and attach it to your notebook. "
    }
  ],
  "comments": [
    {
      "id": 1041455,
      "author_name": "Jayasuriya Senthilvelan",
      "author_url": "",
      "post_date": "2020-10-07T18:45:00.450000",
      "content": "<p>What dataset do I attach the weights to? Can I save the weights and model in HDF5 format and load model with Keras?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1041465,
          "author_name": "Christoffer Karlsson",
          "author_url": "",
          "post_date": "2020-10-07T18:52:07.840000",
          "content": "<p>You create a new dataset and upload the weights to it, eg. as a HDF5 file saved by Keras. You can also create a dataset from the output of a notebook if you want to do your training here on Kaggle.</p>\n<p>You can also update your dataset with new weights later if you retrain your model, and it will be used the next time to your run your submission notebook. If you used a notebook to create the weights in the first place, you can update the dataset from that.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1041466,
          "author_name": "quadcore/Richard Epstein",
          "author_url": "",
          "post_date": "2020-10-07T18:52:33.613000",
          "content": "<p>Yes.</p>\n<p>Train<br>\nSave model/weights with keras.<br>\nCreate a personal dataset. <br>\nCopy the model to it. <br>\nAttach the dataset to your notebook. <br>\nLoad the model from the dataset.<br>\nPreprocess and inference the test data</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1041396,
      "author_name": "Araik Tamazian",
      "author_url": "",
      "post_date": "2020-10-07T18:06:00.477000",
      "content": "<p>And about submission -- remember that you can submit only inference kernel, i.e. kernel without any training procedure. You'll have to train your own model, add its weights to the dataset and attach that dataset to your inference kernel to do predictions.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1041334,
      "author_name": "Christoffer Karlsson",
      "author_url": "",
      "post_date": "2020-10-07T17:31:01.493000",
      "content": "<p>Create a dataset with your pre-trained model and attach it to your notebook. </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1041290": "Hi, \nThe guidelines say that we can use pre trained models (3rd party) in our submission. In my code, in order to use a pre trained model, I have to clone it from its GitHub repo. When I restart the kernel however, the notebook doesn't seem to remember the cloned files, so I have to re-download using the internet\n\nWill this pose an issue during submission? How do I get the downloaded repo to persist?\n\nThanks,\nJay",
    "1041455": "What dataset do I attach the weights to? Can I save the weights and model in HDF5 format and load model with Keras?",
    "1041396": "And about submission -- remember that you can submit only inference kernel, i.e. kernel without any training procedure. You'll have to train your own model, add its weights to the dataset and attach that dataset to your inference kernel to do predictions.",
    "1041334": "Create a dataset with your pre-trained model and attach it to your notebook. "
  }
}