{
  "id": 394051,
  "title": "Loading the TF-Lite model failing with this error",
  "url": "/competitions/asl-signs/discussion/394051",
  "author_name": "",
  "post_date": "2023-03-11T22:15:49.217038100Z",
  "votes": null,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hi,<br>\nI am trying to load a simple TF-Lite model after training it in PyTorch. While trying to load it, I am seeing the following error -</p>\n<p><code>RuntimeError: Encountered unresolved custom op: Cast.\nSee instructions: https://www.tensorflow.org/lite/guide/ops_custom Node number 76 (Cast) failed to prepare.</code> </p>\n<p>My model is a simple Conv2D and Linear layers. Any help on how I can resolve this is highly appreciated. :) </p>",
  "messages": [
    {
      "id": "2177898",
      "postDate": "03/11/2023 22:15:49",
      "content": "<p>Hi,<br>\nI am trying to load a simple TF-Lite model after training it in PyTorch. While trying to load it, I am seeing the following error -</p>\n<p><code>RuntimeError: Encountered unresolved custom op: Cast.\nSee instructions: https://www.tensorflow.org/lite/guide/ops_custom Node number 76 (Cast) failed to prepare.</code> </p>\n<p>My model is a simple Conv2D and Linear layers. Any help on how I can resolve this is highly appreciated. :) </p>",
      "rawMarkdown": "Hi,\nI am trying to load a simple TF-Lite model after training it in PyTorch. While trying to load it, I am seeing the following error -\n\n`RuntimeError: Encountered unresolved custom op: Cast.\nSee instructions: https://www.tensorflow.org/lite/guide/ops_custom Node number 76 (Cast) failed to prepare.` \n\nMy model is a simple Conv2D and Linear layers. Any help on how I can resolve this is highly appreciated. :)",
      "votes": null
    },
    {
      "id": "2180219",
      "postDate": "03/13/2023 17:08:18",
      "content": "<p>It sounds like you're trying to use an operator that isn't supported by TFLite. I recommend taking a look at this guide: <a href=\"https://www.tensorflow.org/lite/guide/ops_compatibility\" target=\"_blank\">https://www.tensorflow.org/lite/guide/ops_compatibility</a></p>",
      "rawMarkdown": "It sounds like you're trying to use an operator that isn't supported by TFLite. I recommend taking a look at this guide: https://www.tensorflow.org/lite/guide/ops_compatibility",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2180219,
      "author_name": "sohier",
      "author_url": "",
      "post_date": "03/13/2023 17:08:18",
      "content": "<p>It sounds like you're trying to use an operator that isn't supported by TFLite. I recommend taking a look at this guide: <a href=\"https://www.tensorflow.org/lite/guide/ops_compatibility\" target=\"_blank\">https://www.tensorflow.org/lite/guide/ops_compatibility</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2177898": "Hi,\nI am trying to load a simple TF-Lite model after training it in PyTorch. While trying to load it, I am seeing the following error -\n\n`RuntimeError: Encountered unresolved custom op: Cast.\nSee instructions: https://www.tensorflow.org/lite/guide/ops_custom Node number 76 (Cast) failed to prepare.` \n\nMy model is a simple Conv2D and Linear layers. Any help on how I can resolve this is highly appreciated. :)",
    "2180219": "It sounds like you're trying to use an operator that isn't supported by TFLite. I recommend taking a look at this guide: https://www.tensorflow.org/lite/guide/ops_compatibility"
  },
  "source": "meta"
}