tf.contrib.predictor.from_contrib_estimator(
estimator,
prediction_input_fn,
input_alternative_key=None,
output_alternative_key=None,
graph=None,
config=None
)
Defined in tensorflow/contrib/predictor/predictor_factories.py
.
Constructs a Predictor
from a tf.contrib.learn.Estimator
.
Args:
estimator
: an instance oftf.contrib.learn.Estimator
.prediction_input_fn
: a function that takes no arguments and returns an instance ofInputFnOps
.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 Tensorflowgraph
in which prediction should be done.config
:ConfigProto
proto used to configure the session.
Returns:
An initialized Predictor
.
Raises:
TypeError
: ifestimator
is a coreEstimator
instead of a contribEstimator
.