Question :
he should be like that
export_dir = ... ... builder = tf.saved_model.builder.SavedModelBuilder(export_dir) with tf.Session(graph=tf.Graph()) as sess: ... builder.add_meta_graph_and_variables(sess, [tf.saved_model.tag_constants.TRAINING], signature_def_map=foo_signatures, assets_collection=foo_assets) ... with tf.Session(graph=tf.Graph()) as sess: ... builder.add_meta_graph(["bar-tag", "baz-tag"]) ... builder.save()
So, first I need to load breakpoints with:
saver = tf.train.import_meta_graph('model-number.meta') saver.restore(sess, tf.train.latest_checkpoint('./'))
And then use this sess for the builder.
I'm right?
source share