tf.contrib.predictor.from_estimator(
estimator,
serving_input_receiver_fn,
output_key=None,
graph=None
)
Defined in tensorflow/contrib/predictor/predictor_factories.py.
Constructs a Predictor from a tf.python.estimator.Estimator.
estimator: an instance of learn.python.estimator.Estimator.serving_input_receiver_fn: a function that takes no arguments and returns an instance of ServingInputReceiver compatible with estimator.output_key: Optional string specifying the export output to use. If None, then DEFAULT_SERVING_SIGNATURE_DEF_KEY is used.graph: Optional. The Tensorflow graph in which prediction should be done.An initialized Predictor.
TypeError: if estimator is a contrib Estimator instead of a core Estimator.
© 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_estimator