tf.contrib.predictor.from_estimator
Stay organized with collections
Save and categorize content based on your preferences.
Constructs a Predictor
from a tf.python.estimator.Estimator
.
tf.contrib.predictor.from_estimator(
estimator, serving_input_receiver_fn, output_key=None, graph=None, config=None
)
Args |
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.
|
config
|
ConfigProto proto used to configure the session.
|
Returns |
An initialized Predictor .
|
Raises |
TypeError
|
if estimator is a contrib Estimator instead of a core
Estimator .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.predictor.from_estimator\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/predictor/predictor_factories.py#L71-L105) |\n\nConstructs a `Predictor` from a `tf.python.estimator.Estimator`. \n\n tf.contrib.predictor.from_estimator(\n estimator, serving_input_receiver_fn, output_key=None, graph=None, config=None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------------------------|-------------------------------------------------------------------------------------------------------------------|\n| `estimator` | an instance of `learn.python.estimator.Estimator`. |\n| `serving_input_receiver_fn` | a function that takes no arguments and returns an instance of `ServingInputReceiver` compatible with `estimator`. |\n| `output_key` | Optional string specifying the export output to use. If `None`, then `DEFAULT_SERVING_SIGNATURE_DEF_KEY` is used. |\n| `graph` | Optional. The Tensorflow `graph` in which prediction should be done. |\n| `config` | `ConfigProto` proto used to configure the session. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| An initialized `Predictor`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|-------------|------------------------------------------------------------------------|\n| `TypeError` | if `estimator` is a contrib `Estimator` instead of a core `Estimator`. |\n\n\u003cbr /\u003e"]]