New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using TF-Lite visualizer to create the HTML file from a TF-Lite model #18857
Comments
Try: |
The same problem:
|
Oh.. I see. You need back-quotes around the last portion of the command: bazel run tensorflow/contrib/lite/tools:visualize -- `realpath ./quant_mobilenet_v1_infer.tflite` |
@andrehentz Thanks a lot. The previous error is solved. However, another error occurs:
It seems that "flatc" is not correctly generated? |
That's possible, but it looks like the tool is looking for it in the wrong place. We will fix that. |
Nagging Assignee @andrehentz: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
same problem , is there any update? |
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No Describe the problem After download mobileNet with *tflite.
bazel run tensorflow/contrib/lite/tools:visualize -- ~/mobilenet/mobilenet_v1_1.0_224.tflite ./foo.html bazel still builds, but smilar errors like the above reported are seen sh: third_party/flatbuffers/flatc: No such file or directory IOError: [Errno 2] No such file or directory: '/tmp/mobilenet_v1_1.0_224.json' |
The realpath trick mentioned above has no help. |
Nagging Assignee @andrehentz: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
System information Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No I'm having the same problem. Attempting to use the command
The full error is:
|
It seems to be a general bug. Many people see it |
I have been able to replicate this issue using tensorflow-1.9.0 and Linux. I think the issue is with paths to the schema and also the missing flatc file in thirdparty/flatbuffers/flatc The current workaround that works for me is to install flatbuffers cloning Google/flatbuffers repo using cmake to build. After which, I updated the paths to _BINARY and _SCHEMA at the top of tensorflow/contrib/lite/tools/visualize.py Example: _BINARY = path/to/flatc/file/in/cloned/flatbuffers/folder _SCHEMA = Specify the output file to a path of your choice for example: This has allowed me to visualize my tflite models. Hope that helps! |
@Sri-vatsa @HwMohanLiu @samsun639 @tingxingdong Figured it out. Requires cmake
For reference my paths looks like: |
@andrewginns Thanks for writing the step by step instructions! I was typing it on my phone so I tried to keep it short. |
@HwMohanLiu Is this still an open issue? |
No, I followed the solution of andrewginns and it works now. |
System information
Describe the problem
Source code / logs
However, I got error info:
which is caused by CreateHtmlFile function in visualize.py
The text was updated successfully, but these errors were encountered: