Skip to content

Can't convert pb model to tflite model #10

@tonmoyborah

Description

@tonmoyborah

Hi, I used your script k2tf_convert.py to convert my trained Keras model to .pb format. Next I wanted to use it to convert to tflite model. When I call tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) on the pb model, it throws an error
RuntimeError: MetaGraphDef associated with tags {'serve'} could not be found in SavedModel. To inspect available tag-sets in the SavedModel, please use the SavedModel CLI: saved_model_cli``

Can you give any pointers as to what I should do to make this work. Initially I wanted to convert my Keras models to lite models for post-training quantization. I run saved_model_cli show --dir <dir> but it shows empty result, no tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions