How to transform tensorflow checkpoint model(.meta .index .data) to frozen model (.pb)

Hey guys:

I want to transform this network,, from tensorflow to nvidia tensorRT. It need a ‘.pb’ model file, but the project only giving three model files as follow:

  • deblur.model-52300.index
  • deblur.model-52300.meta

So I want to transform these files to a ‘.pb’ file.

I have tested the ideas given by:

The problem is that both gave ideas are failed because of the get_checkpoint_state() and latest_checkpoint() giving None value.

Is this caused by the missing of checkpoint file?

Are there other ways to implement this?

Any idea is appreciated.



this is not TensorRT related.

You can check the scripts provided by Google

have a look at this file, you can generate .pb file directly from a checkpoint file and a meta graph.
While executing, you can specify the input arguments like this:


Thanks for your help.