Convert .pb to .tflite

266 views
Skip to first unread message

Jonathan Sanchez

unread,
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 https://tfhub.dev/google/openimages_v4/ssd/mobilenet_v2/1 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 https://www.tensorflow.org/lite/convert/cmdline 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?

Regards

Jonathan.

Ben B

unread,
Aug 27, 2020, 1:01:01 PM8/27/20
to TensorFlow Hub, jonathanr...@gmail.com
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 https://tfhub.dev/tensorflow/collections/object_detection/1


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
Forward
0 new messages