keras_to_tensorflow icon indicating copy to clipboard operation
keras_to_tensorflow copied to clipboard

Associate MetaGraphDef with tag Serve

Open nemanjaq opened this issue 6 years ago • 4 comments

Hello,


I'm trying to convert Pb model to TFLite with following code:
converter = tf.contrib.lite.TocoConverter.from_saved_model(DIR_OUT + '/test')
tflite_model = converter.convert()
open("converted_model.tflite", "wb").write(tflite_model)

but there's 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

When used, SavedModel CLI show empty result, so my question is, how to add it to saved Pb properly?

nemanjaq avatar Nov 13 '18 13:11 nemanjaq

The same problem occured to me.Have you solved it?Looking forward to your reply!

zylxadz avatar Mar 29 '19 08:03 zylxadz

If I remember correctly, it wasn't solved.

Project required iOS mlmodel anyway, so I converted pb to it, and reduced size ( https://developer.apple.com/documentation/coreml/reducing_the_size_of_your_core_ml_app )

nemanjaq avatar Mar 29 '19 11:03 nemanjaq

Same problem here. If someone has an idea of how to solve this please share

thibthibaut avatar Jan 09 '20 17:01 thibthibaut

any solution to this ?

raghavgurbaxani avatar May 01 '20 00:05 raghavgurbaxani