contrib.learn.make_export_strategy
tf.contrib.learn.make_export_strategy
tf.contrib.learn.make_export_strategy
make_export_strategy( serving_input_fn, default_output_alternative_key=None, assets_extra=None, as_text=False, exports_to_keep=5 )
Defined in tensorflow/contrib/learn/python/learn/utils/saved_model_export_utils.py
.
Create an ExportStrategy for use with Experiment.
Args:
-
serving_input_fn
: A function that takes no arguments and returns anInputFnOps
. -
default_output_alternative_key
: the name of the head to serve when an incoming serving request does not explicitly request a specific head. Must beNone
if the estimator inherits from ${tf.estimator.Estimator} or for single-headed models. -
assets_extra
: A dict specifying how to populate the assets.extra directory within the exported SavedModel. Each key should give the destination path (including the filename) relative to the assets.extra directory. The corresponding value gives the full path of the source file to be copied. For example, the simple case of copying a single file without renaming it is specified as{'my_asset_file.txt': '/path/to/my_asset_file.txt'}
. -
as_text
: whether to write the SavedModel proto in text format. -
exports_to_keep
: Number of exports to keep. Older exports will be garbage-collected. Defaults to 5. Set to None to disable garbage collection.
Returns:
An ExportStrategy that can be passed to the Experiment constructor.
© 2017 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/learn/make_export_strategy