问题
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.
来源:https://stackoverflow.com/questions/51340880/trying-to-convert-tensorflow-model-to-tensorflow-lite-when-running-toco-help