{
  "id": 139667,
  "title": "No other way to add our model to the kaggle kernel?",
  "url": "/competitions/deepfake-detection-challenge/discussion/139667",
  "author_name": "",
  "post_date": "2020-03-29T19:36:02.992479200Z",
  "votes": null,
  "comment_count": 5,
  "views": 0,
  "content": "<p>We created several large models, and the external data exceeded 1024 MB.\nIs there really no other way to add our model to the kaggle kernel?</p>\n\n<p>Thanks.</p>",
  "messages": [
    {
      "id": "790701",
      "postDate": "03/29/2020 19:36:02",
      "content": "<p>We created several large models, and the external data exceeded 1024 MB.\nIs there really no other way to add our model to the kaggle kernel?</p>\n\n<p>Thanks.</p>",
      "rawMarkdown": "We created several large models, and the external data exceeded 1024 MB.\nIs there really no other way to add our model to the kaggle kernel?\n\nThanks.",
      "votes": null
    },
    {
      "id": "790706",
      "postDate": "03/29/2020 19:42:35",
      "content": "<p>Try to saveweight instead of model? Weights have smaller size.</p>",
      "rawMarkdown": "Try to saveweight instead of model? Weights have smaller size.",
      "votes": null
    },
    {
      "id": "790733",
      "postDate": "03/29/2020 20:14:54",
      "content": "<p>We created tensorflow .pb files using the tensorflow api.\nHow do I load weights?\nDFDC is the first competition. Thank you.</p>",
      "rawMarkdown": "We created tensorflow .pb files using the tensorflow api.\nHow do I load weights?\nDFDC is the first competition. Thank you.",
      "votes": null
    },
    {
      "id": "790734",
      "postDate": "03/29/2020 20:16:48",
      "content": "<p>when you use tensorflow,</p>\n\n<ul>\n<li>from here - -</li>\n</ul>\n\n<p>export_path = 'saved_model/name_of_your_trained_model'\nif(not os.path.exists(export_path)):\n    os.mkdir(export_path)\nmodel.save(export_path, save_format='tf')</p>\n\n<ul>\n<li>to here - -</li>\n</ul>\n\n<p>will save only weight. mine is less than 100MB size. and you can load it on notebook by</p>\n\n<ul>\n<li>from here - -</li>\n</ul>\n\n<p>model = tf.keras.models.load_model(saved_model_path)\nmodel.summary()</p>\n\n<ul>\n<li>to here - -</li>\n</ul>\n\n<p>fyi. all the best.   Mats</p>",
      "rawMarkdown": "when you use tensorflow,\n\n- from here - -\n\nexport_path = 'saved_model/name_of_your_trained_model'\nif(not os.path.exists(export_path)):\n    os.mkdir(export_path)\nmodel.save(export_path, save_format='tf')\n\n- to here - -\n\nwill save only weight. mine is less than 100MB size. and you can load it on notebook by\n\n- from here - -\n\nmodel = tf.keras.models.load_model(saved_model_path)\nmodel.summary()\n\n- to here - -\n\nfyi. all the best.   Mats",
      "votes": null
    },
    {
      "id": "790818",
      "postDate": "03/29/2020 21:49:44",
      "content": "<p>Our model is around 50MB. However, because of the large number, we need to further reduce the size.</p>",
      "rawMarkdown": "Our model is around 50MB. However, because of the large number, we need to further reduce the size.",
      "votes": null
    },
    {
      "id": "790826",
      "postDate": "03/29/2020 21:59:20",
      "content": "<p>have u tried python's zipfile module that lets your code read data without extracting it? if your disk is fully occupied, i believe it's one conceivable option (= keep zipped data and read as it is). check 'ZipFile.read()' thing if it sounds applicable to your case. fyi.   Mats</p>",
      "rawMarkdown": "have u tried python's zipfile module that lets your code read data without extracting it? if your disk is fully occupied, i believe it's one conceivable option (= keep zipped data and read as it is). check 'ZipFile.read()' thing if it sounds applicable to your case. fyi.   Mats",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 790706,
      "author_name": "yuanzhezhou",
      "author_url": "",
      "post_date": "03/29/2020 19:42:35",
      "content": "<p>Try to saveweight instead of model? Weights have smaller size.</p>",
      "votes": null,
      "replies": [
        {
          "id": 790733,
          "author_name": "junipark",
          "author_url": "",
          "post_date": "03/29/2020 20:14:54",
          "content": "<p>We created tensorflow .pb files using the tensorflow api.\nHow do I load weights?\nDFDC is the first competition. Thank you.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 790734,
      "author_name": "matsuryu",
      "author_url": "",
      "post_date": "03/29/2020 20:16:48",
      "content": "<p>when you use tensorflow,</p>\n\n<ul>\n<li>from here - -</li>\n</ul>\n\n<p>export_path = 'saved_model/name_of_your_trained_model'\nif(not os.path.exists(export_path)):\n    os.mkdir(export_path)\nmodel.save(export_path, save_format='tf')</p>\n\n<ul>\n<li>to here - -</li>\n</ul>\n\n<p>will save only weight. mine is less than 100MB size. and you can load it on notebook by</p>\n\n<ul>\n<li>from here - -</li>\n</ul>\n\n<p>model = tf.keras.models.load_model(saved_model_path)\nmodel.summary()</p>\n\n<ul>\n<li>to here - -</li>\n</ul>\n\n<p>fyi. all the best.   Mats</p>",
      "votes": null,
      "replies": [
        {
          "id": 790818,
          "author_name": "junipark",
          "author_url": "",
          "post_date": "03/29/2020 21:49:44",
          "content": "<p>Our model is around 50MB. However, because of the large number, we need to further reduce the size.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 790826,
          "author_name": "matsuryu",
          "author_url": "",
          "post_date": "03/29/2020 21:59:20",
          "content": "<p>have u tried python's zipfile module that lets your code read data without extracting it? if your disk is fully occupied, i believe it's one conceivable option (= keep zipped data and read as it is). check 'ZipFile.read()' thing if it sounds applicable to your case. fyi.   Mats</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "790701": "We created several large models, and the external data exceeded 1024 MB.\nIs there really no other way to add our model to the kaggle kernel?\n\nThanks.",
    "790706": "Try to saveweight instead of model? Weights have smaller size.",
    "790733": "We created tensorflow .pb files using the tensorflow api.\nHow do I load weights?\nDFDC is the first competition. Thank you.",
    "790734": "when you use tensorflow,\n\n- from here - -\n\nexport_path = 'saved_model/name_of_your_trained_model'\nif(not os.path.exists(export_path)):\n    os.mkdir(export_path)\nmodel.save(export_path, save_format='tf')\n\n- to here - -\n\nwill save only weight. mine is less than 100MB size. and you can load it on notebook by\n\n- from here - -\n\nmodel = tf.keras.models.load_model(saved_model_path)\nmodel.summary()\n\n- to here - -\n\nfyi. all the best.   Mats",
    "790818": "Our model is around 50MB. However, because of the large number, we need to further reduce the size.",
    "790826": "have u tried python's zipfile module that lets your code read data without extracting it? if your disk is fully occupied, i believe it's one conceivable option (= keep zipped data and read as it is). check 'ZipFile.read()' thing if it sounds applicable to your case. fyi.   Mats"
  },
  "source": "meta"
}