tf.contrib.predictor.from_saved_model
Stay organized with collections
Save and categorize content based on your preferences.
Constructs a Predictor
from a SavedModel
on disk.
tf.contrib.predictor.from_saved_model(
export_dir, signature_def_key=None, signature_def=None, input_names=None,
output_names=None, tags=None, graph=None, config=None
)
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.
input_names: A dictionary mapping strings to Tensor s in the SavedModel
that represent the input. The keys can be any string of the user's
choosing.
output_names: A dictionary mapping strings to Tensor s in the
SavedModel that represent the output. The keys can be any string of
the user's choosing.
|
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.
|
config
|
ConfigProto proto used to configure the session.
|
Returns |
An initialized Predictor .
|
Raises |
ValueError
|
More than one of signature_def_key and signature_def is
specified.
|
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[]]