Skip to content
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

Exporting tflite model for tensorflow lite TPU #67

Open
zlg9folira opened this issue Jun 22, 2020 · 1 comment
Open

Exporting tflite model for tensorflow lite TPU #67

zlg9folira opened this issue Jun 22, 2020 · 1 comment

Comments

@zlg9folira
Copy link

Has a TFLite model ever been exported for the TF model in this repo? If there is one, can you upload it or a step-by-step guide is appreciated.

I run TF2.1.0 Python3.7 Linux and am trying to export one using
python3 export_tflite_ssd_graph.py --pipeline_config_path=/PATH_TO/pipeline.config --trained_checkpoint_prefix=/PATH_TO/model.ckpt.data-00000-of-00001 --output_directory=/my_tflite --add_postprocessing_op=true

and get error
File "../.local/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 2715, in placeholder raise RuntimeError("tf.placeholder() is not compatible with " RuntimeError: tf.placeholder() is not compatible with eager execution.

@dtsmith2001
Copy link

@zlg9folira we are having a similar problem

File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/lite/python/tflite_convert.py", line 235, in _convert_tf2_model tflite_model = converter.convert() File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/lite/python/lite.py", line 446, in convert "invalid shape '{1}'.".format(_get_tensor_name(tensor), shape_list)) ValueError: None is only supported in the 1st dimension. Tensor 'image_tensor' has invalid shape '[None, None, None, 3]'.

Did you resolve the problem or develop a work-around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants