{
  "id": 121679,
  "title": "[SOLVED] Can't load private Keras models?",
  "url": "/competitions/deepfake-detection-challenge/discussion/121679",
  "author_name": "",
  "post_date": "2019-12-14T18:06:17.589142700Z",
  "votes": 5,
  "comment_count": 9,
  "views": 0,
  "content": "<p>I trained a keras model on the training data, and from the output (a model.h5 and a history.csv files) I created a private dataset. Then, in a separate (inference) kernel, I predict the test set using the model I loaded from my private dataset. The model is clearly under 1GB.</p>\n\n<p>However, when i try to submit submission.csv from my inference, it keeps telling me: \"Your notebook cannot use non-standard datasets in this competition\". </p>\n\n<p>Any idea on how I can submit anything?</p>\n\n<p>EDIT: solved by manually uploading model.h5 instead of generating from kernel output.</p>",
  "messages": [
    {
      "id": "695184",
      "postDate": "12/14/2019 18:06:17",
      "content": "<p>I trained a keras model on the training data, and from the output (a model.h5 and a history.csv files) I created a private dataset. Then, in a separate (inference) kernel, I predict the test set using the model I loaded from my private dataset. The model is clearly under 1GB.</p>\n\n<p>However, when i try to submit submission.csv from my inference, it keeps telling me: \"Your notebook cannot use non-standard datasets in this competition\". </p>\n\n<p>Any idea on how I can submit anything?</p>\n\n<p>EDIT: solved by manually uploading model.h5 instead of generating from kernel output.</p>",
      "rawMarkdown": "I trained a keras model on the training data, and from the output (a model.h5 and a history.csv files) I created a private dataset. Then, in a separate (inference) kernel, I predict the test set using the model I loaded from my private dataset. The model is clearly under 1GB.\n\nHowever, when i try to submit submission.csv from my inference, it keeps telling me: \"Your notebook cannot use non-standard datasets in this competition\". \n\nAny idea on how I can submit anything?\n\nEDIT: solved by manually uploading model.h5 instead of generating from kernel output.",
      "votes": null
    },
    {
      "id": "695190",
      "postDate": "12/14/2019 18:14:05",
      "content": "<p>did you attach output of the training kernel? if yes, thats not allowed.</p>",
      "rawMarkdown": "did you attach output of the training kernel? if yes, thats not allowed.",
      "votes": null
    },
    {
      "id": "695191",
      "postDate": "12/14/2019 18:14:23",
      "content": "<p>Per the \"Code Requirements\" section:</p>\n\n<p><code>No using other Kaggle notebooks or utility scripts as inputs to your submission notebook. External data also cannot be externally-referenced (i.e. via BigQuery, Github, external URL). Instead, load external models or datasets directly as an external data source.\n</code></p>\n\n<p>You'll need to upload the <code>h5</code> and <code>csv</code> files as a dataset, instead of using the output from a previous kernel.</p>\n\n<p>Try using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.</p>",
      "rawMarkdown": "Per the \"Code Requirements\" section:\n\n```No using other Kaggle notebooks or utility scripts as inputs to your submission notebook. External data also cannot be externally-referenced (i.e. via BigQuery, Github, external URL). Instead, load external models or datasets directly as an external data source.\n```\n\nYou'll need to upload the `h5` and `csv` files as a dataset, instead of using the output from a previous kernel.\n\nTry using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.",
      "votes": null
    },
    {
      "id": "695192",
      "postDate": "12/14/2019 18:16:16",
      "content": "<p>No I created a new dataset from the kernel, and loaded that dataset into my inference kernel. I didn't directly load the kernel output.</p>",
      "rawMarkdown": "No I created a new dataset from the kernel, and loaded that dataset into my inference kernel. I didn't directly load the kernel output.",
      "votes": null
    },
    {
      "id": "695193",
      "postDate": "12/14/2019 18:16:45",
      "content": "<blockquote>\n  <p>Try using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.</p>\n</blockquote>\n\n<p>Exactly what i did lol</p>",
      "rawMarkdown": "&gt; Try using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.\n\nExactly what i did lol",
      "votes": null
    },
    {
      "id": "695194",
      "postDate": "12/14/2019 18:20:16",
      "content": "<p>Oh ¯_(ツ)_/¯ maybe kaggle knows that the new dataset was created from a kernel. Did you try downloading and re-uploading into a dataset not linked to the first kernel?</p>",
      "rawMarkdown": "Oh ¯\\_(ツ)_/¯ maybe kaggle knows that the new dataset was created from a kernel. Did you try downloading and re-uploading into a dataset not linked to the first kernel?",
      "votes": null
    },
    {
      "id": "695195",
      "postDate": "12/14/2019 18:22:31",
      "content": "<p>That's a good idea, i'm trying this right now haha</p>",
      "rawMarkdown": "That's a good idea, i'm trying this right now haha",
      "votes": null
    },
    {
      "id": "695211",
      "postDate": "12/14/2019 19:09:13",
      "content": "<p>This worked :)</p>",
      "rawMarkdown": "This worked :)",
      "votes": null
    },
    {
      "id": "723027",
      "postDate": "01/19/2020 12:20:32",
      "content": "<p>I had the same error when trying to create a new dataset with a file from the URL option. After downloading from this URL to my machine -&gt; creating a new dataset -&gt; actually uploading the file to the dataset - it worked. </p>",
      "rawMarkdown": "I had the same error when trying to create a new dataset with a file from the URL option. After downloading from this URL to my machine -&gt; creating a new dataset -&gt; actually uploading the file to the dataset - it worked.",
      "votes": null
    },
    {
      "id": "949851",
      "postDate": "07/29/2020 02:41:39",
      "content": "<p>I want to call keras's inception_v3 model (via ' from keras.applications  import inception_v3 ')  inside my notebook. Is this allowed? I can't do this while being offline though so I cant get the submit option up. this is as when i call keras. inception_v3.InceptionV3 it tries to load a h5 file online from  the url ' ttps://github.com/fchollet/deep-learning-models/releases/download/v0.5/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5 ' ?? </p>\n\n<p>Is there a way for me to use this locally via my call to keras.applications   as </p>\n\n<p>``TimeDistributed(inception_v3.InceptionV3(include_top=False,pooling='max',weights='imagenet'))(img_input)</p>\n\n<p>in my code</p>\n\n<p>Please heeeelp Im stuck :(</p>",
      "rawMarkdown": "I want to call keras's inception_v3 model (via ' from keras.applications  import inception_v3 ')  inside my notebook. Is this allowed? I can't do this while being offline though so I cant get the submit option up. this is as when i call keras. inception_v3.InceptionV3 it tries to load a h5 file online from  the url ' ttps://github.com/fchollet/deep-learning-models/releases/download/v0.5/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5 ' ?? \n\nIs there a way for me to use this locally via my call to keras.applications   as \n\n``TimeDistributed(inception_v3.InceptionV3(include_top=False,pooling='max',weights='imagenet'))(img_input)\n\nin my code\n\nPlease heeeelp Im stuck :(",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 695190,
      "author_name": "abhishek",
      "author_url": "",
      "post_date": "12/14/2019 18:14:05",
      "content": "<p>did you attach output of the training kernel? if yes, thats not allowed.</p>",
      "votes": null,
      "replies": [
        {
          "id": 695192,
          "author_name": "xhlulu",
          "author_url": "",
          "post_date": "12/14/2019 18:16:16",
          "content": "<p>No I created a new dataset from the kernel, and loaded that dataset into my inference kernel. I didn't directly load the kernel output.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 695191,
      "author_name": "robikscube",
      "author_url": "",
      "post_date": "12/14/2019 18:14:23",
      "content": "<p>Per the \"Code Requirements\" section:</p>\n\n<p><code>No using other Kaggle notebooks or utility scripts as inputs to your submission notebook. External data also cannot be externally-referenced (i.e. via BigQuery, Github, external URL). Instead, load external models or datasets directly as an external data source.\n</code></p>\n\n<p>You'll need to upload the <code>h5</code> and <code>csv</code> files as a dataset, instead of using the output from a previous kernel.</p>\n\n<p>Try using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.</p>",
      "votes": null,
      "replies": [
        {
          "id": 695193,
          "author_name": "xhlulu",
          "author_url": "",
          "post_date": "12/14/2019 18:16:45",
          "content": "<blockquote>\n  <p>Try using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.</p>\n</blockquote>\n\n<p>Exactly what i did lol</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 695194,
          "author_name": "robikscube",
          "author_url": "",
          "post_date": "12/14/2019 18:20:16",
          "content": "<p>Oh ¯_(ツ)_/¯ maybe kaggle knows that the new dataset was created from a kernel. Did you try downloading and re-uploading into a dataset not linked to the first kernel?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 695195,
          "author_name": "xhlulu",
          "author_url": "",
          "post_date": "12/14/2019 18:22:31",
          "content": "<p>That's a good idea, i'm trying this right now haha</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 695211,
          "author_name": "xhlulu",
          "author_url": "",
          "post_date": "12/14/2019 19:09:13",
          "content": "<p>This worked :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 723027,
      "author_name": "odedgolden",
      "author_url": "",
      "post_date": "01/19/2020 12:20:32",
      "content": "<p>I had the same error when trying to create a new dataset with a file from the URL option. After downloading from this URL to my machine -&gt; creating a new dataset -&gt; actually uploading the file to the dataset - it worked. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 949851,
      "author_name": "pollgorm1",
      "author_url": "",
      "post_date": "07/29/2020 02:41:39",
      "content": "<p>I want to call keras's inception_v3 model (via ' from keras.applications  import inception_v3 ')  inside my notebook. Is this allowed? I can't do this while being offline though so I cant get the submit option up. this is as when i call keras. inception_v3.InceptionV3 it tries to load a h5 file online from  the url ' ttps://github.com/fchollet/deep-learning-models/releases/download/v0.5/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5 ' ?? </p>\n\n<p>Is there a way for me to use this locally via my call to keras.applications   as </p>\n\n<p>``TimeDistributed(inception_v3.InceptionV3(include_top=False,pooling='max',weights='imagenet'))(img_input)</p>\n\n<p>in my code</p>\n\n<p>Please heeeelp Im stuck :(</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "695184": "I trained a keras model on the training data, and from the output (a model.h5 and a history.csv files) I created a private dataset. Then, in a separate (inference) kernel, I predict the test set using the model I loaded from my private dataset. The model is clearly under 1GB.\n\nHowever, when i try to submit submission.csv from my inference, it keeps telling me: \"Your notebook cannot use non-standard datasets in this competition\". \n\nAny idea on how I can submit anything?\n\nEDIT: solved by manually uploading model.h5 instead of generating from kernel output.",
    "695190": "did you attach output of the training kernel? if yes, thats not allowed.",
    "695191": "Per the \"Code Requirements\" section:\n\n```No using other Kaggle notebooks or utility scripts as inputs to your submission notebook. External data also cannot be externally-referenced (i.e. via BigQuery, Github, external URL). Instead, load external models or datasets directly as an external data source.\n```\n\nYou'll need to upload the `h5` and `csv` files as a dataset, instead of using the output from a previous kernel.\n\nTry using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.",
    "695192": "No I created a new dataset from the kernel, and loaded that dataset into my inference kernel. I didn't directly load the kernel output.",
    "695193": "&gt; Try using the the \"New Dataset\" button next to the output files in your first kernel. And then reference that dataset in your second.\n\nExactly what i did lol",
    "695194": "Oh ¯\\_(ツ)_/¯ maybe kaggle knows that the new dataset was created from a kernel. Did you try downloading and re-uploading into a dataset not linked to the first kernel?",
    "695195": "That's a good idea, i'm trying this right now haha",
    "695211": "This worked :)",
    "723027": "I had the same error when trying to create a new dataset with a file from the URL option. After downloading from this URL to my machine -&gt; creating a new dataset -&gt; actually uploading the file to the dataset - it worked.",
    "949851": "I want to call keras's inception_v3 model (via ' from keras.applications  import inception_v3 ')  inside my notebook. Is this allowed? I can't do this while being offline though so I cant get the submit option up. this is as when i call keras. inception_v3.InceptionV3 it tries to load a h5 file online from  the url ' ttps://github.com/fchollet/deep-learning-models/releases/download/v0.5/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5 ' ?? \n\nIs there a way for me to use this locally via my call to keras.applications   as \n\n``TimeDistributed(inception_v3.InceptionV3(include_top=False,pooling='max',weights='imagenet'))(img_input)\n\nin my code\n\nPlease heeeelp Im stuck :("
  },
  "source": "meta"
}