I have only model.ckpt file at all. I'm newbie, have spent a lot of time to research, some tutorials need meta graph file but I don't have. Can I convert model.ckpt file to model.pb file without meta graph file (.meta)?
import os
import tensorflow as tf
export_dir = 'export_dir'
trained_checkpoint_prefix = 'models/model.ckpt'
graph = tf.Graph()
loader = tf.train.import_meta_graph(trained_checkpoint_prefix + ".meta" )
sess = tf.Session()
loader.restore(sess,trained_checkpoint_prefix)
builder = tf.saved_model.builder.SavedModelBuilder(export_dir)
builder.add_meta_graph_and_variables(sess, [tf.saved_model.tag_constants.TRAINING, tf.saved_model.tag_constants.SERVING], strip_default_attrs=True)
builder.save()