Convert .pb to .tflite

Skip to first unread message

Jonathan Sanchez

Aug 17, 2020, 10:51:58 AM8/17/20
to TensorFlow Hub
Hi guys,

I've been struggling to convert a .pb model to .tflite, I downloaded the model from and I'm trying to convert it using the converter command line interface, and also tried using the Python API (without Bazel) but not making any progress. I'm following the steps from but I'm still stuck. Also I saw that you could convert a "Saved Model" to tflite, but the one I got from tfhub it's not that kind of file (correct me if I'm wrong).

Do you guys know how to convert the model to tflite?



Ben B

Aug 27, 2020, 1:01:01 PM8/27/20
to TensorFlow Hub,
You're right Jonathan

Its not a SavedModel, its a Hub module (the tensorflow 1 hub format). You could try look for a module on tfhub that has the format type: "SavedModel", some are listed here

I tried to look for a way to convert this `Hub module` format into a SavedModel/ `.pb or for tensorflow lite `.tflite`, but wasn't able to find anything! Sorry :)
Reply all
Reply to author
0 new messages