diff --git a/10_neural_nets_with_keras.ipynb b/10_neural_nets_with_keras.ipynb index c48f989..c383572 100644 --- a/10_neural_nets_with_keras.ipynb +++ b/10_neural_nets_with_keras.ipynb @@ -2055,7 +2055,7 @@ } ], "source": [ - "model.save(\"my_keras_model\")" + "model.save(\"my_keras_model\", save_format=\"tf\")" ] }, { @@ -3678,7 +3678,7 @@ ], "source": [ "early_stopping_cb = tf.keras.callbacks.EarlyStopping(patience=20)\n", - "checkpoint_cb = tf.keras.callbacks.ModelCheckpoint(\"my_mnist_model.h5\", save_best_only=True)\n", + "checkpoint_cb = tf.keras.callbacks.ModelCheckpoint(\"my_mnist_model\", save_best_only=True)\n", "tensorboard_cb = tf.keras.callbacks.TensorBoard(run_logdir)\n", "\n", "history = model.fit(X_train, y_train, epochs=100,\n", @@ -3710,7 +3710,7 @@ } ], "source": [ - "model = tf.keras.models.load_model(\"my_mnist_model.h5\") # rollback to best model\n", + "model = tf.keras.models.load_model(\"my_mnist_model\") # rollback to best model\n", "model.evaluate(X_test, y_test)" ] }, @@ -3781,7 +3781,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.9.10" }, "nav_menu": { "height": "264px",