Legacy_init_op in the TensorFlow service

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)
+4
source share
1 answer

Tensorflow Serving . tf < 1.2 op. tf.tables_initializer() . ModelBundle.

+6

Source: https://habr.com/ru/post/1683067/


All Articles