tf.saved_model.SaveOptions

View source on GitHub

Class SaveOptions

Options for saving to SavedModel.

Aliases:

This function may be used in the options argument in functions that save a SavedModel (tf.saved_model.save, tf.keras.models.save_model).

__init__

View source

__init__(
    namespace_whitelist=None,
    save_debug_info=False
)

Creates an object that stores options for SavedModel saving.

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 Members

  • namespace_whitelist
  • save_debug_info