I am trying to train a quantized object detection model for the edge tpu, but cannot convert tensorflow frozen graph to a quantized model.
Sorry for the bad question, I am new to tensorflow.
I can convert frozen graph to a not-quantized model, and I am using tensorflow 1.14 on windows 10.
I am expecting this command to successfully create a quantized tflite model, but instead, it throws and error
Here is my command
tflite_convert --output_file detect.tflite --graph_def_file tflite_graph.pb --inference_type QUANTIZED_UINT8 --input_arrays Const --output_arrays TFLite_Detection_PostProcess --input_shape (1, 3
00, 300, 3) --target_ops TFLITE_BUILTINS,SELECT_TF_OPS --allow_custom_ops --mean_values 128 --std_dev_values 128 --default_ranges_min 0 --default_ranges_max 6 --inference_input_type QUANTIZED_UINT8
My error message is this:
2019-08-19 15:52:40.565510: F tensorflow/lite/toco/graph_transformations/quantize.cc:611] Check failed: is_rnn_state_array Fatal Python error: Aborted
Current thread 0x000032d8 (most recent call first): File "c:\users\bowen yang\appdata\local\programs\python\python36\lib\site-packages\tensorflow\lite\toco\python\toco_from_protos.py", line 33 in execute File "c:\users\bowen yang\appdata\local\programs\python\python36\lib\site-packages\absl\app.py", line 251 in _run_main File "c:\users\bowen yang\appdata\local\programs\python\python36\lib\site-packages\absl\app.py", line 300 in run File "c:\users\bowen yang\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\platform\app.py", line 40 in run File "c:\users\bowen yang\appdata\local\programs\python\python36\lib\site-packages\tensorflow\lite\toco\python\toco_from_protos.py", line 59 in main File "C:\Users\Bowen Yang\AppData\Local\Programs\Python\Python36\Scripts\toco_from_protos.exe__main__.py", line 9 in File "c:\users\bowen yang\appdata\local\programs\python\python36\lib\runpy.py", line 85 in _run_code File "c:\users\bowen yang\appdata\local\programs\python\python36\lib\runpy.py", line 193 in _run_module_as_main
User contributions licensed under CC BY-SA 3.0