tf.compat.v1.saved_model.simple_save

Convenience function to build a SavedModel suitable for serving. (deprecated)

Used in the notebooks

Used in the guide

In many common cases, saving models for serving will be as simple as:

simple_save(session,
            export_dir,
            inputs={"x": x, "y": y},
            outputs={"z": z})

Although in many cases it's not necessary to understand all of the many ways to configure a SavedModel, this method has a few practical implications:

  • It will be treated as a graph for inference / serving (i.e. uses the tag saved_model.SERVING)
  • The SavedModel will load in TensorFlow Serving and supports the Predict API. To use the Classify, Regress, or MultiInference APIs, please use either tf.Estimator or the lower level SavedModel APIs.
  • Some TensorFlow ops depend on information on disk or other information called "assets". These are generally handled automatically by adding the assets to the GraphKeys.ASSET_FILEPATHS collection. Only assets in that collection are exported; if you need more custom behavior, you'll need to use the SavedModelBuilder.

More information about SavedModel and signatures can be found here: https://github.com/tensorflow/tensor