What is difference between saving a model by
- using exporter as specified in tensorflow serving:
eg:
from tensorflow.contrib.session_bundle import exporter
#from tensorflow_serving.session_bundle import exporter
saver = tf.train.Saver(sharded=True)
model_exporter = exporter.Exporter(saver)
model_exporter.init(
sess.graph.as_graph_def(),
named_graph_signatures={
'inputs': exporter.generic_signature({'images': x}),
'outputs': exporter.generic_signature({'scores': y})})
model_exporter.export(export_path, tf.constant(FLAGS.export_version), sess)
- Using tf.train.write_graph() and tf.train.Saver() directly:
eg:
with sess.graph.as_default():
saver = tf.train.Saver()
saver.save(sess, path, meta_graph_suffix='meta', write_meta_graph=True)
Question is in continuation of TensorFlow saving into/loading a graph from a file