{
  "id": 395885,
  "title": "tf.experimental.numpy ?",
  "url": "/competitions/asl-signs/discussion/395885",
  "author_name": "",
  "post_date": "2023-03-19T09:55:45.079131800Z",
  "votes": 3,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Is anyone using tf.experimental.numpy in your model ?<br>\nIf so, is it getting converted to tflite ?</p>\n<p>Any issues with submission ?</p>",
  "messages": [
    {
      "id": "2188110",
      "postDate": "03/19/2023 09:55:45",
      "content": "<p>Is anyone using tf.experimental.numpy in your model ?<br>\nIf so, is it getting converted to tflite ?</p>\n<p>Any issues with submission ?</p>",
      "rawMarkdown": "Is anyone using tf.experimental.numpy in your model ?\nIf so, is it getting converted to tflite ?\n\nAny issues with submission ?",
      "votes": null
    },
    {
      "id": "2188579",
      "postDate": "03/19/2023 19:15:35",
      "content": "<p>I'm using tf.experimental.numpy.nanmean, it works ok for calculating mean and std. Not sure about other methods.</p>",
      "rawMarkdown": "I'm using tf.experimental.numpy.nanmean, it works ok for calculating mean and std. Not sure about other methods.",
      "votes": null
    },
    {
      "id": "2189312",
      "postDate": "03/20/2023 11:54:00",
      "content": "<p>it is probably easy to check your generated tflite file:</p>\n<ul>\n<li>start a new notebook</li>\n<li>use only import tflite runtime. DO NOT USE import tf.</li>\n<li>loop true train xyz data of various lengths (no. of frames)</li>\n<li>if there is no error, it is probably likely to work</li>\n</ul>\n<p>further check:</p>\n<ul>\n<li>use netron to check the call graph</li>\n<li>use benchmark tool to check peak memory and it will also list out all the tflite ops used. </li>\n</ul>",
      "rawMarkdown": "it is probably easy to check your generated tflite file:\n- start a new notebook\n- use only import tflite runtime. DO NOT USE import tf.\n- loop true train xyz data of various lengths (no. of frames)\n- if there is no error, it is probably likely to work\n\nfurther check:\n- use netron to check the call graph\n- use benchmark tool to check peak memory and it will also list out all the tflite ops used.",
      "votes": null
    },
    {
      "id": "2189909",
      "postDate": "03/20/2023 22:00:15",
      "content": "<p><a href=\"https://www.kaggle.com/dhakshiin1601\" target=\"_blank\">@dhakshiin1601</a> <code>tf.experimental.numpy</code> might be considered a custom operator and not be compatible for conversion. You can check the operator compatibility <a href=\"https://www.tensorflow.org/lite/guide/ops_compatibility\" target=\"_blank\">guide</a> to determine if your model is compatible with the <code>tf.lite.TFLiteConverter</code>. I had the same problem when using <code>tf.numpy_function()</code>, the solution for my case was to implement the same function but with tensorflow operators. Hope that helps!</p>",
      "rawMarkdown": "dhakshiin1601 `tf.experimental.numpy` might be considered a custom operator and not be compatible for conversion. You can check the operator compatibility [guide](https://www.tensorflow.org/lite/guide/ops_compatibility) to determine if your model is compatible with the `tf.lite.TFLiteConverter`. I had the same problem when using `tf.numpy_function()`, the solution for my case was to implement the same function but with tensorflow operators. Hope that helps!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2188579,
      "author_name": "vbogach",
      "author_url": "",
      "post_date": "03/19/2023 19:15:35",
      "content": "<p>I'm using tf.experimental.numpy.nanmean, it works ok for calculating mean and std. Not sure about other methods.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2189312,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "03/20/2023 11:54:00",
      "content": "<p>it is probably easy to check your generated tflite file:</p>\n<ul>\n<li>start a new notebook</li>\n<li>use only import tflite runtime. DO NOT USE import tf.</li>\n<li>loop true train xyz data of various lengths (no. of frames)</li>\n<li>if there is no error, it is probably likely to work</li>\n</ul>\n<p>further check:</p>\n<ul>\n<li>use netron to check the call graph</li>\n<li>use benchmark tool to check peak memory and it will also list out all the tflite ops used. </li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2189909,
      "author_name": "josephzahar",
      "author_url": "",
      "post_date": "03/20/2023 22:00:15",
      "content": "<p><a href=\"https://www.kaggle.com/dhakshiin1601\" target=\"_blank\">@dhakshiin1601</a> <code>tf.experimental.numpy</code> might be considered a custom operator and not be compatible for conversion. You can check the operator compatibility <a href=\"https://www.tensorflow.org/lite/guide/ops_compatibility\" target=\"_blank\">guide</a> to determine if your model is compatible with the <code>tf.lite.TFLiteConverter</code>. I had the same problem when using <code>tf.numpy_function()</code>, the solution for my case was to implement the same function but with tensorflow operators. Hope that helps!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2188110": "Is anyone using tf.experimental.numpy in your model ?\nIf so, is it getting converted to tflite ?\n\nAny issues with submission ?",
    "2188579": "I'm using tf.experimental.numpy.nanmean, it works ok for calculating mean and std. Not sure about other methods.",
    "2189312": "it is probably easy to check your generated tflite file:\n- start a new notebook\n- use only import tflite runtime. DO NOT USE import tf.\n- loop true train xyz data of various lengths (no. of frames)\n- if there is no error, it is probably likely to work\n\nfurther check:\n- use netron to check the call graph\n- use benchmark tool to check peak memory and it will also list out all the tflite ops used.",
    "2189909": "dhakshiin1601 `tf.experimental.numpy` might be considered a custom operator and not be compatible for conversion. You can check the operator compatibility [guide](https://www.tensorflow.org/lite/guide/ops_compatibility) to determine if your model is compatible with the `tf.lite.TFLiteConverter`. I had the same problem when using `tf.numpy_function()`, the solution for my case was to implement the same function but with tensorflow operators. Hope that helps!"
  },
  "source": "meta"
}