# tf.keras.experimental.load_from_saved_model

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/saving/saved_model_experimental.py#L373-L428) |

Loads a keras Model from a SavedModel created by `export_saved_model()`. (deprecated)

#### View aliases


**Main aliases**

\`tf.contrib.saved_model.load_keras_model\`
**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.experimental.load_from_saved_model`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/keras/experimental/load_from_saved_model), \`tf.compat.v2.keras.experimental.load_from_saved_model\`

<br />

    tf.keras.experimental.load_from_saved_model(
        saved_model_path, custom_objects=None
    )

> [!WARNING]
> **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: The experimental save and load functions have been deprecated. Please switch to [`tf.keras.models.load_model`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/models/load_model).

This function reinstantiates model state by:

1) loading model topology from json (this will eventually come
from metagraph).
2) loading model weights from checkpoint.

#### Example:

    import tensorflow as tf

    # Create a tf.keras model.
    model = tf.keras.Sequential()
    model.add(tf.keras.layers.Dense(1, input_shape=[10]))
    model.summary()

    # Save the tf.keras model in the SavedModel format.
    path = '/tmp/simple_keras_model'
    tf.keras.experimental.export_saved_model(model, path)

    # Load the saved keras model back.
    new_model = tf.keras.experimental.load_from_saved_model(path)
    new_model.summary()

<br />

<br />

<br />

| ## Args ||
|---|---|
| `saved_model_path` | a string specifying the path to an existing SavedModel. |
| `custom_objects` | Optional dictionary mapping names (strings) to custom classes or functions to be considered during deserialization. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| a keras.Model instance. ||

<br />