简体   繁体   中英

Can't convert frozen Inception graph .pb created with Docker to .tflite

I have created a my saved_model.pb through Docker in my macOS device.

After trying tflite_convert --output_file=./myModels/mymodel.tflite --saved_model_dir=./myModels/ it is outputing the following error requiring me a tag argument:

"ValueError: Importing a SavedModel with tf.saved_model.load requires a 'tags=' argument if there is more than one MetaGraph. Got 'tags=None', but there are 0 MetaGraphs in the SavedModel with tag sets []. Pass a 'tags=' argument to load this SavedModel."

I have also tried another command where you will have to provide the input and output arrays but I do know know which ones are my arrays to put in those fields. Anybody got this problem and solved it before? Thanks.

You can find the tags in your saved model using the saved_model_cli:

https://www.tensorflow.org/guide/saved_model#saved_model_cli

$ saved_model_cli show --dir./myModels/ --all

Pass the required tags with --saved_model_tag_set to tflite_convert.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM