{
  "id": 201538,
  "title": "Some doubts regarding submission ",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/201538",
  "author_name": "",
  "post_date": "2020-12-05T13:41:23.455745300Z",
  "votes": 2,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Okay, so the rules are we can't have internet-enabled in our books and no TPU. Fine.</p>\n<p>I trained the model on TPU, saved, and loaded the weights in a new notebook. However, say I am using some neural net as the backbone, I still ought to recreate the structure using tf.Keras.Applications.ResNet</p>\n<p>So, at the end of its creation, it will download the architecture from google. </p>\n<p>This is the problem. If the internet is not enabled, how will this all work? For the weight matrix to be used, there has to be an architecture. </p>",
  "messages": [
    {
      "id": "1102933",
      "postDate": "12/05/2020 13:41:23",
      "content": "<p>Okay, so the rules are we can't have internet-enabled in our books and no TPU. Fine.</p>\n<p>I trained the model on TPU, saved, and loaded the weights in a new notebook. However, say I am using some neural net as the backbone, I still ought to recreate the structure using tf.Keras.Applications.ResNet</p>\n<p>So, at the end of its creation, it will download the architecture from google. </p>\n<p>This is the problem. If the internet is not enabled, how will this all work? For the weight matrix to be used, there has to be an architecture. </p>",
      "rawMarkdown": "Okay, so the rules are we can't have internet-enabled in our books and no TPU. Fine.\n\nI trained the model on TPU, saved, and loaded the weights in a new notebook. However, say I am using some neural net as the backbone, I still ought to recreate the structure using tf.Keras.Applications.ResNet\n\nSo, at the end of its creation, it will download the architecture from google. \n\nThis is the problem. If the internet is not enabled, how will this all work? For the weight matrix to be used, there has to be an architecture.",
      "votes": null
    },
    {
      "id": "1102947",
      "postDate": "12/05/2020 14:02:40",
      "content": "<p>I am not sure what framework you are using but in any framework you can get the model without weights. For example in keras: when you create an object of the model, rather than specifying weights='imagenet' set weights=None.</p>\n<p>You can always download the weights to local and then use load_weights to the model architecture.</p>",
      "rawMarkdown": "I am not sure what framework you are using but in any framework you can get the model without weights. For example in keras: when you create an object of the model, rather than specifying weights='imagenet' set weights=None.\n\nYou can always download the weights to local and then use load_weights to the model architecture.",
      "votes": null
    },
    {
      "id": "1102981",
      "postDate": "12/05/2020 14:37:39",
      "content": "<p>yes! understood. Thank you</p>",
      "rawMarkdown": "yes! understood. Thank you",
      "votes": null
    },
    {
      "id": "1103141",
      "postDate": "12/05/2020 16:51:12",
      "content": "<p>1 -&gt; you can use model weights of different model architecture available in Kaggle dataset or you can download weights from google and make a dataset of that and then intialize it as defining model architecture without weights using tensorflow  or pytorch dont require internet connection just set pretrained = False for pytorch or weights = None for tf and then intialize the weights from your dataset </p>\n<p>2 -&gt;  You can also make a separate train and inference kernel  , you can use internet in your train kernel and then save your model weights from train kernel and then make a dataset of those weights and use that dataset weights to inference your test data . </p>",
      "rawMarkdown": "1 -> you can use model weights of different model architecture available in Kaggle dataset or you can download weights from google and make a dataset of that and then intialize it as defining model architecture without weights using tensorflow  or pytorch dont require internet connection just set pretrained = False for pytorch or weights = None for tf and then intialize the weights from your dataset \n\n2 ->  You can also make a separate train and inference kernel  , you can use internet in your train kernel and then save your model weights from train kernel and then make a dataset of those weights and use that dataset weights to inference your test data .",
      "votes": null
    },
    {
      "id": "1103714",
      "postDate": "12/06/2020 06:55:48",
      "content": "<p>yes thank you for the answer! I got what I was doing wrong !!</p>",
      "rawMarkdown": "yes thank you for the answer! I got what I was doing wrong !!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1102947,
      "author_name": "harveenchadha",
      "author_url": "",
      "post_date": "12/05/2020 14:02:40",
      "content": "<p>I am not sure what framework you are using but in any framework you can get the model without weights. For example in keras: when you create an object of the model, rather than specifying weights='imagenet' set weights=None.</p>\n<p>You can always download the weights to local and then use load_weights to the model architecture.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1102981,
          "author_name": "fireheart7",
          "author_url": "",
          "post_date": "12/05/2020 14:37:39",
          "content": "<p>yes! understood. Thank you</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1103141,
      "author_name": "trooperog",
      "author_url": "",
      "post_date": "12/05/2020 16:51:12",
      "content": "<p>1 -&gt; you can use model weights of different model architecture available in Kaggle dataset or you can download weights from google and make a dataset of that and then intialize it as defining model architecture without weights using tensorflow  or pytorch dont require internet connection just set pretrained = False for pytorch or weights = None for tf and then intialize the weights from your dataset </p>\n<p>2 -&gt;  You can also make a separate train and inference kernel  , you can use internet in your train kernel and then save your model weights from train kernel and then make a dataset of those weights and use that dataset weights to inference your test data . </p>",
      "votes": null,
      "replies": [
        {
          "id": 1103714,
          "author_name": "fireheart7",
          "author_url": "",
          "post_date": "12/06/2020 06:55:48",
          "content": "<p>yes thank you for the answer! I got what I was doing wrong !!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1102933": "Okay, so the rules are we can't have internet-enabled in our books and no TPU. Fine.\n\nI trained the model on TPU, saved, and loaded the weights in a new notebook. However, say I am using some neural net as the backbone, I still ought to recreate the structure using tf.Keras.Applications.ResNet\n\nSo, at the end of its creation, it will download the architecture from google. \n\nThis is the problem. If the internet is not enabled, how will this all work? For the weight matrix to be used, there has to be an architecture.",
    "1102947": "I am not sure what framework you are using but in any framework you can get the model without weights. For example in keras: when you create an object of the model, rather than specifying weights='imagenet' set weights=None.\n\nYou can always download the weights to local and then use load_weights to the model architecture.",
    "1102981": "yes! understood. Thank you",
    "1103141": "1 -> you can use model weights of different model architecture available in Kaggle dataset or you can download weights from google and make a dataset of that and then intialize it as defining model architecture without weights using tensorflow  or pytorch dont require internet connection just set pretrained = False for pytorch or weights = None for tf and then intialize the weights from your dataset \n\n2 ->  You can also make a separate train and inference kernel  , you can use internet in your train kernel and then save your model weights from train kernel and then make a dataset of those weights and use that dataset weights to inference your test data .",
    "1103714": "yes thank you for the answer! I got what I was doing wrong !!"
  },
  "source": "meta"
}