tf.contrib.predictor.from_contrib_estimator( estimator, prediction_input_fn, input_alternative_key=None, output_alternative_key=None, graph=None )
Defined in tensorflow/contrib/predictor/predictor_factories.py
.
Constructs a Predictor
from a tf.contrib.learn.Estimator
.
estimator
: an instance of tf.contrib.learn.Estimator
.prediction_input_fn
: a function that takes no arguments and returns an instance of InputFnOps
.input_alternative_key
: Optional. Specify the input alternative used for prediction.output_alternative_key
: Specify the output alternative used for prediction. Not needed for single-headed models but required for multi-headed models.graph
: Optional. The Tensorflow graph
in which prediction should be done.An initialized Predictor
.
TypeError
: if estimator
is a core Estimator
instead of a contrib 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_contrib_estimator