Skip to content

Commit

Permalink
ensured correct linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sanskarmodi8 committed Sep 11, 2024
1 parent b90b419 commit 7b56abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/en/tutorials/keras/save_and_load.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
},
"outputs": [],
"source": [
"checkpoint_path = \"training_1/cp.weights.h5\" # we are only saving weights therefore we need to use .weights.h5 extension instead we would use .keras for whole model\n",
"checkpoint_path = \"training_1/cp.weights.h5\" # Since you're only saving weights, you should use the .weights.h5 extension. If you're saving the whole model, you would use the .keras extension instead\n",
"checkpoint_dir = os.path.dirname(checkpoint_path)\n",
"\n",
"# Create a callback that saves the model's weights\n",
Expand Down Expand Up @@ -825,7 +825,7 @@
"source": [
"### Saving custom objects\n",
"\n",
"If you are using the SavedModel format, you can skip this section. The key difference between high-level `.keras`/HDF5 formats and the low-level SavedModel format is that the `.keras`/HDF5 formats uses object configs to save the model architecture, while SavedModel saves the execution graph. Thus, SavedModels are able to save custom objects like subclassed models and custom layers without requiring the original code. However, debugging low-level SavedModels can be more difficult as a result, and we recommend using the high-level `.keras` format instead due to its name-based, Keras-native nature.\n",
"If you are using the SavedModel format, you can skip this section. The key difference between high-level `.keras`/HDF5 formats and the low-level SavedModel format is that the `.keras`/HDF5 formats uses object configs to save the model architecture, while SavedModel saves the execution graph. Thus, SavedModels are able to save custom objects like subclassed models and custom layers without requiring the original code. However, debugging low-level SavedModels can be more difficult as a result, and the recommended approach is using the high-level `.keras` format instead due to its name-based, Keras built-in nature.\n",
"\n",
"To save custom objects to `.keras` and HDF5, you must do the following:\n",
"\n",
Expand Down

0 comments on commit 7b56abd

Please sign in to comment.