-1

I have cloned this Image Completion repository and it works on my windows machine in python. The models for face-completion and general-completion are hosted. However, the files don't have a .pb extension. How can I get the name of input and output tensors? I have tried renaming the files with .pb extension and tried loading in tensorboard using this article but it gives the error shown in the screenshot.

I have also tried running this in python using this answer but I get no nodes in output.

How can I get the details like input and output tensors to convert this model into a .tflite model for android? Screenshots:
import model error
tensorboard error

Death14Stroke
  • 101
  • 1
  • 6
  • Its possible that the model aren't pb files. How are the files being generated? Are you using the method shown here: https://www.tensorflow.org/guide/saved_model#save_and_restore_models? These methods should automatically save models in the .pb format. – Sachin Joglekar Mar 01 '19 at 00:02
  • The model is taken from the repository itself...I don't know how they have generated it. I need to run it on Android so want to convert it to a .tflite model. – Death14Stroke Mar 01 '19 at 13:40

1 Answers1

1

The files provided in the repository are checkpoints, and not .pb files that can be converted to .tflite. This can be seen from the saver.restore() call made in demo.py.

To get a pb file, you will have to build a SavedModel. The resulting folder will contain a .py file, which you can use for conversion (assuming it contains TFLite-supported ops).

Sachin Joglekar
  • 686
  • 4
  • 5
  • You are right it seems a checkpoint file. After doing saver.save I got a savedmodel.pb file which I froze using freeze_graph.py. tflite_convert worked on this frozen graph file. – Death14Stroke Mar 13 '19 at 07:59