I noticed that every TensorFlow Serving example uses a parameter legacy_init_opin SavedModelBuilder, but I did not find any clear explanation of what it is and why it is called legacy . Does anyone know the purpose of this argument?
Example:
legacy_init_op = tf.group(tf.tables_initializer(), name='legacy_init_op')
builder.add_meta_graph_and_variables(
sess, [tf.saved_model.tag_constants.SERVING],
signature_def_map={
'predict_images':
prediction_signature,
tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY:
classification_signature,
},
legacy_init_op=legacy_init_op)
source
share