ageron / ageron/handson-ml2

Chapter 12 loading model WARNING in colab

Ouverte
#138 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Jupyter Notebook
Étoiles
30k
Forks
13.1k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

When running the [jupyter notebook](https://colab.research.google.com/github/ageron/handson-ml2/blob/master/12_custom_models_and_training_with_tensorflow.ipynb) in Colaboratory, tf is unable to load the saved optimizer state.

```
model.save("my_model_with_a_custom_loss.h5",)
model = keras.models.load_model("my_model_with_a_custom_loss.h5",
custom_objects={"huber_fn": huber_fn})
```
The message is
```
WARNING:tensorflow:Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.
```
I wonder if anyone has encountered with the same issue, and any ideas? Tones of thanks!

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.