tf.saved_model.SaveOptions
Stay organized with collections
Save and categorize content based on your preferences.
Options for saving to SavedModel.
tf.saved_model.SaveOptions(
namespace_whitelist=None, save_debug_info=False
)
This function may be used in the options
argument in functions that
save a SavedModel (tf.saved_model.save
, tf.keras.models.save_model
).
Args |
namespace_whitelist
|
List of strings containing op namespaces to whitelist
when saving a model. Saving an object that uses namespaced ops must
explicitly add all namespaces to the whitelist. The namespaced ops must
be registered into the framework when loading the SavedModel.
|
save_debug_info
|
Boolean indicating whether debug information is saved.
If True, then a debug/saved_model_debug_info.pb file will be written
with the contents of a GraphDebugInfo binary protocol buffer containing
stack trace information for all ops and functions that are saved.
|
Class Variables
namespace_whitelist
save_debug_info
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.saved_model.SaveOptions\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/saved_model/save_options.py#L28-L53) |\n\nOptions for saving to SavedModel.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.saved_model.SaveOptions`](/api_docs/python/tf/saved_model/SaveOptions)\n\n\u003cbr /\u003e\n\n tf.saved_model.SaveOptions(\n namespace_whitelist=None, save_debug_info=False\n )\n\nThis function may be used in the `options` argument in functions that\nsave a SavedModel ([`tf.saved_model.save`](../../tf/saved_model/save), [`tf.keras.models.save_model`](../../tf/keras/models/save_model)).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `namespace_whitelist` | List of strings containing op namespaces to whitelist when saving a model. Saving an object that uses namespaced ops must explicitly add all namespaces to the whitelist. The namespaced ops must be registered into the framework when loading the SavedModel. |\n| `save_debug_info` | Boolean indicating whether debug information is saved. If True, then a debug/saved_model_debug_info.pb file will be written with the contents of a GraphDebugInfo binary protocol buffer containing stack trace information for all ops and functions that are saved. |\n\n\u003cbr /\u003e\n\nClass Variables\n---------------\n\n- `namespace_whitelist`\n- `save_debug_info`"]]