Trying to convert TensorFlow model to TensorFlow l

2019-09-03 16:34发布

问题:

I am on Windows 10, python 2.7, tensorflow 1.7.

When attempting to call toco - "toco --help", gives me the next error.

File "appdata\local\programs\python\python36\lib\runpy.py", line 193, in 
_run_module_as_main
"__main__", mod_spec)
File "appdata\local\programs\python\python36\lib\runpy.py", line 85, in 
_run_code
exec(code, run_globals)
 File "AppData\Local\Programs\Python\Python36\Scripts\toco.exe\__main__.py", 
line 5, in <module>
ModuleNotFoundError: No module named 
'tensorflow.contrib.lite.toco.python.toco_wrapper'

回答1:

TensorFlow Lite doesn't yet support Windows. We're working on it...

In the mean time, you may want to look at the work around proposed here -- i.e. set up Virtual Machine.

More specific to the conversion code, moving forward (version 1.9 and beyond) you should use tflite_convert.