{
  "id": 211151,
  "title": "Error when try to load an model [Tensorflow]",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/211151",
  "author_name": "",
  "post_date": "2021-01-13T23:10:09.534995300Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I trained an model using Google Colab and saved it to and .h5 file but when I try to import it on Kaggle using load_model I am getting an error which says <br>\nTypeError: ('Keyword argument not understood:', 'fill_value').<br>\nAny ideas? Thanks in advance!</p>",
  "messages": [
    {
      "id": "1152194",
      "postDate": "01/13/2021 23:10:09",
      "content": "<p>I trained an model using Google Colab and saved it to and .h5 file but when I try to import it on Kaggle using load_model I am getting an error which says <br>\nTypeError: ('Keyword argument not understood:', 'fill_value').<br>\nAny ideas? Thanks in advance!</p>",
      "rawMarkdown": "I trained an model using Google Colab and saved it to and .h5 file but when I try to import it on Kaggle using load_model I am getting an error which says \nTypeError: ('Keyword argument not understood:', 'fill_value').\nAny ideas? Thanks in advance!",
      "votes": null
    },
    {
      "id": "1152258",
      "postDate": "01/14/2021 01:35:34",
      "content": "<p>You need to define'fill_value', this function or class, for example like this <br>\ndef ():<br>\nContent containing fill_value…<br>\nor <br>\nclass():<br>\nContent containing fill_value…<br>\nthen   load_model(yourpath,csutom_objects={'fill_value',fill_value})</p>",
      "rawMarkdown": "You need to define'fill_value', this function or class, for example like this \ndef ():\nContent containing fill_value...\nor \nclass():\nContent containing fill_value...\nthen   load_model(yourpath,csutom_objects={'fill_value',fill_value})",
      "votes": null
    },
    {
      "id": "1155680",
      "postDate": "01/16/2021 15:12:37",
      "content": "<p>Either that or you can try including the parameter \"compile=False\" and see if it works.</p>\n<p>Like this:<br>\nmodel = load_model(filepath, compile=False)</p>",
      "rawMarkdown": "Either that or you can try including the parameter \"compile=False\" and see if it works.\n\nLike this:\nmodel = load_model(filepath, compile=False)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1152258,
      "author_name": "zhangeng",
      "author_url": "",
      "post_date": "01/14/2021 01:35:34",
      "content": "<p>You need to define'fill_value', this function or class, for example like this <br>\ndef ():<br>\nContent containing fill_value…<br>\nor <br>\nclass():<br>\nContent containing fill_value…<br>\nthen   load_model(yourpath,csutom_objects={'fill_value',fill_value})</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1155680,
      "author_name": "junyingsg",
      "author_url": "",
      "post_date": "01/16/2021 15:12:37",
      "content": "<p>Either that or you can try including the parameter \"compile=False\" and see if it works.</p>\n<p>Like this:<br>\nmodel = load_model(filepath, compile=False)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1152194": "I trained an model using Google Colab and saved it to and .h5 file but when I try to import it on Kaggle using load_model I am getting an error which says \nTypeError: ('Keyword argument not understood:', 'fill_value').\nAny ideas? Thanks in advance!",
    "1152258": "You need to define'fill_value', this function or class, for example like this \ndef ():\nContent containing fill_value...\nor \nclass():\nContent containing fill_value...\nthen   load_model(yourpath,csutom_objects={'fill_value',fill_value})",
    "1155680": "Either that or you can try including the parameter \"compile=False\" and see if it works.\n\nLike this:\nmodel = load_model(filepath, compile=False)"
  },
  "source": "meta"
}