diff options
author | cheerss <zjdxwwx@163.com> | 2018-07-19 14:57:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-19 14:57:43 +0800 |
commit | 694dd61fcdfb2019af3e28b4151d93bdd690c94a (patch) | |
tree | 603e6b52b732ba053851782d2c6954cae7be68ea /tensorflow/docs_src | |
parent | 81161f9d9987a8eb70793d95048c20be34292859 (diff) |
Update keras.md
tf.keras.models should load model configuration with `model_from_json` or `model_from_yaml`, not `from_json` or `from_yaml`
Diffstat (limited to 'tensorflow/docs_src')
-rw-r--r-- | tensorflow/docs_src/guide/keras.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/docs_src/guide/keras.md b/tensorflow/docs_src/guide/keras.md index 1d846df104..2330fa03c7 100644 --- a/tensorflow/docs_src/guide/keras.md +++ b/tensorflow/docs_src/guide/keras.md @@ -467,13 +467,13 @@ JSON and YAML serialization formats: json_string = model.to_json() # Recreate the model (freshly initialized) -fresh_model = keras.models.from_json(json_string) +fresh_model = keras.models.model_from_json(json_string) # Serializes a model to YAML format yaml_string = model.to_yaml() # Recreate the model -fresh_model = keras.models.from_yaml(yaml_string) +fresh_model = keras.models.model_from_yaml(yaml_string) ``` Caution: Subclassed models are not serializable because their architecture is |