ARM-software / ML-KWS-for-MCU

Keyword spotting on Arm Cortex-M Microcontrollers
Apache License 2.0
1.14k stars 417 forks source link

conver into tensorflow lite #27

Closed cogmeta closed 6 years ago

cogmeta commented 6 years ago

Can someone help me in converting the frozen graph model to tensorflow lite? thanks.

cogmeta commented 6 years ago

Traceback (most recent call last): File "/home/ubuntu/exp/tensorflow-lite/tensorflow/tensorflow/python/tools/freeze_graph.py", line 382, in run_main() File "/home/ubuntu/exp/tensorflow-lite/tensorflow/tensorflow/python/tools/freeze_graph.py", line 379, in run_main app.run(main=my_main, argv=[sys.argv[0]] + unparsed) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "/home/ubuntu/exp/tensorflow-lite/tensorflow/tensorflow/python/tools/freeze_graph.py", line 378, in my_main = lambda unused_args: main(unused_args, flags) File "/home/ubuntu/exp/tensorflow-lite/tensorflow/tensorflow/python/tools/freeze_graph.py", line 272, in main flags.saved_model_tags, checkpoint_version) File "/home/ubuntu/exp/tensorflow-lite/tensorflow/tensorflow/python/tools/freeze_graph.py", line 254, in freeze_graph checkpoint_version=checkpoint_version) File "/home/ubuntu/exp/tensorflow-lite/tensorflow/tensorflow/python/tools/freeze_graph.py", line 99, in freeze_graph_with_defprotos = importer.import_graph_def(input_graph_def, name="") File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 285, in import_graph_def raise ValueError('No op named %s in defined operations.' % node.op) ValueError: No op named DecodeWav in defined operations.

cogmeta commented 6 years ago

I stripped the model of DecodeWav operator and now i am able to convert to tflite.

bhchoi commented 5 years ago

Hello @cogmeta. I have same problem. Could you tell me how to strip DecodeWav operator and parameter value of freeze_graph.py?