{
  "id": 163341,
  "title": "Your First Submission (Baseline Example)",
  "url": "/competitions/landmark-retrieval-2020/discussion/163341",
  "author_name": "Cam Askew",
  "post_date": "2020-07-01T17:25:05.720000",
  "votes": 43,
  "comment_count": 14,
  "views": 0,
  "content": "<p>Hi everyone, and welcome to the competition! </p>\n\n<p>This year's challenge is formatted a little differently than existing ones: submitted models will be run and evaluated online, in a private kernel, against a private dataset. To help you get started and to show how simple the actual submission process is, I put together a <a href=\"https://www.kaggle.com/camaskew/baseline-submission\">baseline submission</a> and shared it publicly. I've also shared a <a href=\"https://www.kaggle.com/camaskew/baseline-landmark-retrieval-model\">pretrained ResNet101 SavedModel</a> as a publicly available dataset.</p>\n\n<p>The submission kernel itself is super simple: using the model dataset as input, I made <code>submission.zip</code> containing the standard SavedModel directory structure:</p>\n\n<p><code>\nsubmission.zip\n├── saved_model.pb\n└── variables\n    ├── variables.data-00000-of-00001\n    └── variables.index\n</code>\nAfter hitting <code>Save &amp; Run All (Commit)</code> in the editor, all you have to do is go back to the kernel page, scroll down to the <code>Output</code> section, and click <code>Submit</code>! </p>\n\n<h3>NOTE: The zipfile <em>must</em> be named <code>submission.zip</code>, and it must be organized exactly as shown above!</h3>\n\n<p>The commit runs quickly, since we're just loading a pretrained model from disk, but you do have to wait ~3h to see your score. You could submit your own models this way, too: just train and export your model in a separate kernel or outside of Kaggle, then create a dataset for it.  Alternatively, you could train a model directly in the submission kernel itself. This way, you don't have to bother downloading the images and can take advantage of Kaggle's free GPU acceleration.</p>\n\n<p>Hopefully this example helps you get started on your first submission; try it out! Once you have the baseline submission working, you could try different embeddings, or train your own.</p>\n\n<p>Looking forward to seeing what you come up with,</p>\n\n<p>Cam</p>",
  "messages": [
    {
      "id": 911367,
      "postDate": "2020-07-01T17:25:05.720Z",
      "content": "<p>Hi everyone, and welcome to the competition! </p>\n\n<p>This year's challenge is formatted a little differently than existing ones: submitted models will be run and evaluated online, in a private kernel, against a private dataset. To help you get started and to show how simple the actual submission process is, I put together a <a href=\"https://www.kaggle.com/camaskew/baseline-submission\">baseline submission</a> and shared it publicly. I've also shared a <a href=\"https://www.kaggle.com/camaskew/baseline-landmark-retrieval-model\">pretrained ResNet101 SavedModel</a> as a publicly available dataset.</p>\n\n<p>The submission kernel itself is super simple: using the model dataset as input, I made <code>submission.zip</code> containing the standard SavedModel directory structure:</p>\n\n<p><code>\nsubmission.zip\n├── saved_model.pb\n└── variables\n    ├── variables.data-00000-of-00001\n    └── variables.index\n</code>\nAfter hitting <code>Save &amp; Run All (Commit)</code> in the editor, all you have to do is go back to the kernel page, scroll down to the <code>Output</code> section, and click <code>Submit</code>! </p>\n\n<h3>NOTE: The zipfile <em>must</em> be named <code>submission.zip</code>, and it must be organized exactly as shown above!</h3>\n\n<p>The commit runs quickly, since we're just loading a pretrained model from disk, but you do have to wait ~3h to see your score. You could submit your own models this way, too: just train and export your model in a separate kernel or outside of Kaggle, then create a dataset for it.  Alternatively, you could train a model directly in the submission kernel itself. This way, you don't have to bother downloading the images and can take advantage of Kaggle's free GPU acceleration.</p>\n\n<p>Hopefully this example helps you get started on your first submission; try it out! Once you have the baseline submission working, you could try different embeddings, or train your own.</p>\n\n<p>Looking forward to seeing what you come up with,</p>\n\n<p>Cam</p>",
      "rawMarkdown": "Hi everyone, and welcome to the competition! \n\nThis year's challenge is formatted a little differently than existing ones: submitted models will be run and evaluated online, in a private kernel, against a private dataset. To help you get started and to show how simple the actual submission process is, I put together a [baseline submission](https://www.kaggle.com/camaskew/baseline-submission) and shared it publicly. I've also shared a [pretrained ResNet101 SavedModel](https://www.kaggle.com/camaskew/baseline-landmark-retrieval-model) as a publicly available dataset.\n\nThe submission kernel itself is super simple: using the model dataset as input, I made `submission.zip` containing the standard SavedModel directory structure:\n\n```\nsubmission.zip\n├── saved_model.pb\n└── variables\n    ├── variables.data-00000-of-00001\n    └── variables.index\n```\nAfter hitting `Save &amp; Run All (Commit)` in the editor, all you have to do is go back to the kernel page, scroll down to the `Output` section, and click `Submit`! \n\n### NOTE: The zipfile _must_ be named `submission.zip`, and it must be organized exactly as shown above! \n\nThe commit runs quickly, since we're just loading a pretrained model from disk, but you do have to wait ~3h to see your score. You could submit your own models this way, too: just train and export your model in a separate kernel or outside of Kaggle, then create a dataset for it.  Alternatively, you could train a model directly in the submission kernel itself. This way, you don't have to bother downloading the images and can take advantage of Kaggle's free GPU acceleration.\n\nHopefully this example helps you get started on your first submission; try it out! Once you have the baseline submission working, you could try different embeddings, or train your own.\n\nLooking forward to seeing what you come up with,\n\nCam\n",
      "votes": 41
    },
    {
      "id": 911399,
      "postDate": "2020-07-01T17:47:41.230Z",
      "content": "<p>One small thing to add: sometimes, when saving TF models in SavedModel format, an extra subfolder, called <code>assets</code>, may be produced. If it is empty (often the case), you don't need to bother including it in the submission file. However, if it is not empty, you should include it in order for the model to be loaded correctly.</p>\n\n<p>References:</p>\n\n<ul>\n<li><a href=\"https://www.tensorflow.org/guide/saved_model\">TensorFlow SavedModel tutorial</a></li>\n<li><a href=\"https://www.tensorflow.org/api_docs/python/tf/saved_model/Asset\">TensorFlow SavedModel assets</a></li>\n</ul>",
      "rawMarkdown": "One small thing to add: sometimes, when saving TF models in SavedModel format, an extra subfolder, called `assets`, may be produced. If it is empty (often the case), you don't need to bother including it in the submission file. However, if it is not empty, you should include it in order for the model to be loaded correctly.\n\nReferences:\n\n* [TensorFlow SavedModel tutorial](https://www.tensorflow.org/guide/saved_model)\n* [TensorFlow SavedModel assets](https://www.tensorflow.org/api_docs/python/tf/saved_model/Asset)",
      "votes": 7
    },
    {
      "id": 960679,
      "postDate": "2020-08-06T15:38:20.653Z",
      "content": "<p><a href=\"/camaskew\">@camaskew</a> <a href=\"/andrefaraujo\">@andrefaraujo</a> can you guys inform us if this baseline model was trained in the GLD dataset or the GLDv2 (clean)? Is this model the same mentioned in the DELG paper? Thanks</p>",
      "rawMarkdown": "@camaskew @andrefaraujo can you guys inform us if this baseline model was trained in the GLD dataset or the GLDv2 (clean)? Is this model the same mentioned in the DELG paper? Thanks",
      "replies": [
        {
          "id": 965470,
          "postDate": "2020-08-10T16:58:17.617Z",
          "content": "<p>This is the RN101 baseline from the GLDv2 paper, trained on GLDv2-clean.</p>",
          "rawMarkdown": "This is the RN101 baseline from the GLDv2 paper, trained on GLDv2-clean.",
          "votes": 1
        },
        {
          "id": 965530,
          "postDate": "2020-08-10T17:41:56.343Z",
          "content": "<p>Thanks!</p>",
          "rawMarkdown": "Thanks!"
        }
      ]
    },
    {
      "id": 959473,
      "postDate": "2020-08-05T15:58:27.157Z",
      "content": "<p>I submitted but my zip has an extra file called \"variables.data-00001-of-00002\". Any idea how can I fix this??</p>",
      "rawMarkdown": "I submitted but my zip has an extra file called \"variables.data-00001-of-00002\". Any idea how can I fix this??\n",
      "replies": [
        {
          "id": 960079,
          "postDate": "2020-08-06T05:59:32.773Z",
          "content": "<p>you need to submit with gpu/tpu turned off otherwise the format will be different, in your case it will create this new file</p>",
          "rawMarkdown": "you need to submit with gpu/tpu turned off otherwise the format will be different, in your case it will create this new file",
          "votes": 1
        },
        {
          "id": 960116,
          "postDate": "2020-08-06T06:38:34.023Z",
          "content": "<p>I did not really understand what is the problem and what should I do?\n```\nfrom zipfile import ZipFile</p>\n\n<p>with ZipFile('submission.zip','w') as zip: <br>\n    zip.write('./my_model/saved_model.pb', arcname='saved_model.pb') \n    zip.write('./my_model/variables/variables.data-00000-of-00001', arcname='variables/variables.data-00000-of-00001')</p>\n\n<h1>zip.write('./my_model/variables/variables.data-00001-of-00002', arcname='variables/variables.data-00001-of-00002')</h1>\n\n<pre><code>zip.write('./my_model/variables/variables.index', arcname='variables/variables.index') \n</code></pre>\n\n<p>```\nI have done the above and ran it on CPU but the submission.zip went down to only 10mb and I am again getting a submission error.</p>\n\n<p>Thank you :)</p>",
          "rawMarkdown": "I did not really understand what is the problem and what should I do?\n```\nfrom zipfile import ZipFile\n\nwith ZipFile('submission.zip','w') as zip:           \n    zip.write('./my_model/saved_model.pb', arcname='saved_model.pb') \n    zip.write('./my_model/variables/variables.data-00000-of-00001', arcname='variables/variables.data-00000-of-00001')\n#     zip.write('./my_model/variables/variables.data-00001-of-00002', arcname='variables/variables.data-00001-of-00002') \n    zip.write('./my_model/variables/variables.index', arcname='variables/variables.index') \n```\nI have done the above and ran it on CPU but the submission.zip went down to only 10mb and I am again getting a submission error.\n\nThank you :)"
        },
        {
          "id": 960693,
          "postDate": "2020-08-06T15:46:37.043Z",
          "content": "<p>I suggest you to use two kernel\nThe first to train your model and after that save it with model.save (or save weight if you prefer)\nThe other one you load the model and save it in the right format with cpu enabled (not gpu)</p>",
          "rawMarkdown": "I suggest you to use two kernel\nThe first to train your model and after that save it with model.save (or save weight if you prefer)\nThe other one you load the model and save it in the right format with cpu enabled (not gpu)"
        }
      ]
    },
    {
      "id": 917376,
      "postDate": "2020-07-06T12:57:28.823Z",
      "content": "<p><a href=\"/camaskew\">@camaskew</a> <a href=\"/andrefaraujo\">@andrefaraujo</a> Do we have to enable GPU in this 1st submission?  or in the inference it will use GPU automatically even we do not enable GPU ?</p>",
      "rawMarkdown": "@camaskew @andrefaraujo Do we have to enable GPU in this 1st submission?  or in the inference it will use GPU automatically even we do not enable GPU ?",
      "replies": [
        {
          "id": 917556,
          "postDate": "2020-07-06T15:55:36.743Z",
          "content": "<p>It will use GPU automatically.</p>",
          "rawMarkdown": "It will use GPU automatically.",
          "votes": 5
        },
        {
          "id": 971046,
          "postDate": "2020-08-15T06:12:20.293Z",
          "content": "<p>What does the error \"Notebook Exceeded Allowed Compute\"  mean?  CPU or GPU exceeded?</p>",
          "rawMarkdown": "What does the error \"Notebook Exceeded Allowed Compute\"  mean?  CPU or GPU exceeded?"
        }
      ]
    },
    {
      "id": 959347,
      "postDate": "2020-08-05T14:12:44.547Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 923897,
      "postDate": "2020-07-11T06:59:58.520Z",
      "rawMarkdown": "",
      "votes": -1,
      "isDeleted": true
    },
    {
      "id": 913200,
      "postDate": "2020-07-03T03:59:52.310Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 911399,
      "author_name": "Andre Araujo",
      "author_url": "",
      "post_date": "2020-07-01T17:47:41.230000",
      "content": "<p>One small thing to add: sometimes, when saving TF models in SavedModel format, an extra subfolder, called <code>assets</code>, may be produced. If it is empty (often the case), you don't need to bother including it in the submission file. However, if it is not empty, you should include it in order for the model to be loaded correctly.</p>\n\n<p>References:</p>\n\n<ul>\n<li><a href=\"https://www.tensorflow.org/guide/saved_model\">TensorFlow SavedModel tutorial</a></li>\n<li><a href=\"https://www.tensorflow.org/api_docs/python/tf/saved_model/Asset\">TensorFlow SavedModel assets</a></li>\n</ul>",
      "votes": 7,
      "replies": []
    },
    {
      "id": 960679,
      "author_name": "Eduardo Rocha de Andrade",
      "author_url": "",
      "post_date": "2020-08-06T15:38:20.653000",
      "content": "<p><a href=\"/camaskew\">@camaskew</a> <a href=\"/andrefaraujo\">@andrefaraujo</a> can you guys inform us if this baseline model was trained in the GLD dataset or the GLDv2 (clean)? Is this model the same mentioned in the DELG paper? Thanks</p>",
      "votes": 0,
      "replies": [
        {
          "id": 965470,
          "author_name": "Andre Araujo",
          "author_url": "",
          "post_date": "2020-08-10T16:58:17.617000",
          "content": "<p>This is the RN101 baseline from the GLDv2 paper, trained on GLDv2-clean.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 965530,
          "author_name": "Eduardo Rocha de Andrade",
          "author_url": "",
          "post_date": "2020-08-10T17:41:56.343000",
          "content": "<p>Thanks!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 959473,
      "author_name": "Photon Dodo",
      "author_url": "",
      "post_date": "2020-08-05T15:58:27.157000",
      "content": "<p>I submitted but my zip has an extra file called \"variables.data-00001-of-00002\". Any idea how can I fix this??</p>",
      "votes": 0,
      "replies": [
        {
          "id": 960079,
          "author_name": "Davide Stenner",
          "author_url": "",
          "post_date": "2020-08-06T05:59:32.773000",
          "content": "<p>you need to submit with gpu/tpu turned off otherwise the format will be different, in your case it will create this new file</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 960116,
          "author_name": "Photon Dodo",
          "author_url": "",
          "post_date": "2020-08-06T06:38:34.023000",
          "content": "<p>I did not really understand what is the problem and what should I do?\n```\nfrom zipfile import ZipFile</p>\n\n<p>with ZipFile('submission.zip','w') as zip: <br>\n    zip.write('./my_model/saved_model.pb', arcname='saved_model.pb') \n    zip.write('./my_model/variables/variables.data-00000-of-00001', arcname='variables/variables.data-00000-of-00001')</p>\n\n<h1>zip.write('./my_model/variables/variables.data-00001-of-00002', arcname='variables/variables.data-00001-of-00002')</h1>\n\n<pre><code>zip.write('./my_model/variables/variables.index', arcname='variables/variables.index') \n</code></pre>\n\n<p>```\nI have done the above and ran it on CPU but the submission.zip went down to only 10mb and I am again getting a submission error.</p>\n\n<p>Thank you :)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 960693,
          "author_name": "Davide Stenner",
          "author_url": "",
          "post_date": "2020-08-06T15:46:37.043000",
          "content": "<p>I suggest you to use two kernel\nThe first to train your model and after that save it with model.save (or save weight if you prefer)\nThe other one you load the model and save it in the right format with cpu enabled (not gpu)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 917376,
      "author_name": "Neuron Engineer",
      "author_url": "",
      "post_date": "2020-07-06T12:57:28.823000",
      "content": "<p><a href=\"/camaskew\">@camaskew</a> <a href=\"/andrefaraujo\">@andrefaraujo</a> Do we have to enable GPU in this 1st submission?  or in the inference it will use GPU automatically even we do not enable GPU ?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 917556,
          "author_name": "Andre Araujo",
          "author_url": "",
          "post_date": "2020-07-06T15:55:36.743000",
          "content": "<p>It will use GPU automatically.</p>",
          "votes": 5,
          "replies": []
        },
        {
          "id": 971046,
          "author_name": "Lei",
          "author_url": "",
          "post_date": "2020-08-15T06:12:20.293000",
          "content": "<p>What does the error \"Notebook Exceeded Allowed Compute\"  mean?  CPU or GPU exceeded?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 959347,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-08-05T14:12:44.547000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 923897,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-07-11T06:59:58.520000",
      "content": "",
      "votes": -1,
      "replies": []
    },
    {
      "id": 913200,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-07-03T03:59:52.310000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "911367": "Hi everyone, and welcome to the competition! \n\nThis year's challenge is formatted a little differently than existing ones: submitted models will be run and evaluated online, in a private kernel, against a private dataset. To help you get started and to show how simple the actual submission process is, I put together a [baseline submission](https://www.kaggle.com/camaskew/baseline-submission) and shared it publicly. I've also shared a [pretrained ResNet101 SavedModel](https://www.kaggle.com/camaskew/baseline-landmark-retrieval-model) as a publicly available dataset.\n\nThe submission kernel itself is super simple: using the model dataset as input, I made `submission.zip` containing the standard SavedModel directory structure:\n\n```\nsubmission.zip\n├── saved_model.pb\n└── variables\n    ├── variables.data-00000-of-00001\n    └── variables.index\n```\nAfter hitting `Save &amp; Run All (Commit)` in the editor, all you have to do is go back to the kernel page, scroll down to the `Output` section, and click `Submit`! \n\n### NOTE: The zipfile _must_ be named `submission.zip`, and it must be organized exactly as shown above! \n\nThe commit runs quickly, since we're just loading a pretrained model from disk, but you do have to wait ~3h to see your score. You could submit your own models this way, too: just train and export your model in a separate kernel or outside of Kaggle, then create a dataset for it.  Alternatively, you could train a model directly in the submission kernel itself. This way, you don't have to bother downloading the images and can take advantage of Kaggle's free GPU acceleration.\n\nHopefully this example helps you get started on your first submission; try it out! Once you have the baseline submission working, you could try different embeddings, or train your own.\n\nLooking forward to seeing what you come up with,\n\nCam\n",
    "911399": "One small thing to add: sometimes, when saving TF models in SavedModel format, an extra subfolder, called `assets`, may be produced. If it is empty (often the case), you don't need to bother including it in the submission file. However, if it is not empty, you should include it in order for the model to be loaded correctly.\n\nReferences:\n\n* [TensorFlow SavedModel tutorial](https://www.tensorflow.org/guide/saved_model)\n* [TensorFlow SavedModel assets](https://www.tensorflow.org/api_docs/python/tf/saved_model/Asset)",
    "960679": "@camaskew @andrefaraujo can you guys inform us if this baseline model was trained in the GLD dataset or the GLDv2 (clean)? Is this model the same mentioned in the DELG paper? Thanks",
    "959473": "I submitted but my zip has an extra file called \"variables.data-00001-of-00002\". Any idea how can I fix this??\n",
    "917376": "@camaskew @andrefaraujo Do we have to enable GPU in this 1st submission?  or in the inference it will use GPU automatically even we do not enable GPU ?",
    "959347": "",
    "923897": "",
    "913200": ""
  }
}