W3cubDocs

/TensorFlow Python

tf.contrib.predictor.from_saved_model

tf.contrib.predictor.from_saved_model(
    export_dir,
    signature_def_key=None,
    signature_def=None,
    tags=None,
    graph=None
)

Defined in tensorflow/contrib/predictor/predictor_factories.py.

Constructs a Predictor from a SavedModel on disk.

Args:

  • export_dir: a path to a directory containing a SavedModel.
  • signature_def_key: Optional string specifying the signature to use. If None, then DEFAULT_SERVING_SIGNATURE_DEF_KEY is used. Only one of signature_def_key and signature_def
  • signature_def: A SignatureDef proto specifying the inputs and outputs for prediction. Only one of signature_def_key and signature_def should be specified.
  • tags: Optional. Tags that will be used to retrieve the correct SignatureDef. Defaults to DEFAULT_TAGS.
  • graph: Optional. The Tensorflow graph in which prediction should be done.

Returns:

An initialized Predictor.

Raises:

  • ValueError: More than one of signature_def_key and signature_def is specified.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/predictor/from_saved_model