Skip to content

Commit

Permalink
mkdir
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkDaoust committed Sep 10, 2024
1 parent a2a302e commit 9e6397b
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions site/en/tutorials/keras/save_and_load.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 54,
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "2pHVBk_seED1"
Expand All @@ -33,7 +33,7 @@
},
{
"cell_type": "code",
"execution_count": 55,
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "N_fMsQ-N8I7j"
Expand Down Expand Up @@ -136,7 +136,7 @@
},
{
"cell_type": "code",
"execution_count": 56,
"execution_count": null,
"metadata": {
"id": "RzIOVSdnMYyO"
},
Expand All @@ -147,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": null,
"metadata": {
"id": "7Nm7Tyb-gRt-"
},
Expand All @@ -174,7 +174,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": null,
"metadata": {
"id": "9rGfFwE9XVwz"
},
Expand Down Expand Up @@ -209,7 +209,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": null,
"metadata": {
"id": "0HZbJIjxyX1S"
},
Expand Down Expand Up @@ -260,7 +260,7 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": null,
"metadata": {
"id": "IFPuhwntH8VH"
},
Expand Down Expand Up @@ -297,7 +297,7 @@
},
{
"cell_type": "code",
"execution_count": 62,
"execution_count": null,
"metadata": {
"id": "gXG5FVKFOVQ3"
},
Expand All @@ -319,7 +319,7 @@
},
{
"cell_type": "code",
"execution_count": 63,
"execution_count": null,
"metadata": {
"id": "Fp5gbuiaPqCT"
},
Expand All @@ -344,7 +344,7 @@
},
{
"cell_type": "code",
"execution_count": 64,
"execution_count": null,
"metadata": {
"id": "2IZxbwiRRSD2"
},
Expand Down Expand Up @@ -373,7 +373,7 @@
},
{
"cell_type": "code",
"execution_count": 65,
"execution_count": null,
"metadata": {
"id": "mQF_dlgIVOvq"
},
Expand All @@ -382,6 +382,7 @@
"# Include the epoch in the file name (uses `str.format`)\n",
"checkpoint_path = \"training_2/cp-{epoch:04d}.weights.h5\"\n",
"checkpoint_dir = os.path.dirname(checkpoint_path)\n",
"os.mkdir(checkpoint_dir)\n",
"\n",
"batch_size = 32\n",
"\n",
Expand Down Expand Up @@ -424,7 +425,7 @@
},
{
"cell_type": "code",
"execution_count": 66,
"execution_count": null,
"metadata": {
"id": "p64q3-V4sXt0"
},
Expand All @@ -435,7 +436,7 @@
},
{
"cell_type": "code",
"execution_count": 67,
"execution_count": null,
"metadata": {
"id": "1AN_fnuyR41H"
},
Expand All @@ -462,7 +463,7 @@
},
{
"cell_type": "code",
"execution_count": 68,
"execution_count": null,
"metadata": {
"id": "3M04jyK-H3QK"
},
Expand Down Expand Up @@ -514,13 +515,14 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": null,
"metadata": {
"id": "R7W5plyZ-u9X"
},
"outputs": [],
"source": [
"# Save the weights\n",
"os.mkdir('./checkpoints')\n",
"model.save_weights('./checkpoints/my_checkpoint.weights.h5')\n",
"\n",
"# Create a new model instance\n",
Expand Down Expand Up @@ -585,7 +587,7 @@
},
{
"cell_type": "code",
"execution_count": 70,
"execution_count": null,
"metadata": {
"id": "3f55mAXwukUX"
},
Expand All @@ -610,7 +612,7 @@
},
{
"cell_type": "code",
"execution_count": 71,
"execution_count": null,
"metadata": {
"id": "HyfUMOZwux_-"
},
Expand All @@ -633,7 +635,7 @@
},
{
"cell_type": "code",
"execution_count": 72,
"execution_count": null,
"metadata": {
"id": "8BT4mHNIvMdW"
},
Expand Down Expand Up @@ -666,7 +668,7 @@
},
{
"cell_type": "code",
"execution_count": 76,
"execution_count": null,
"metadata": {
"id": "sI1YvCDFzpl3"
},
Expand All @@ -692,7 +694,7 @@
},
{
"cell_type": "code",
"execution_count": 77,
"execution_count": null,
"metadata": {
"id": "sq8fPglI1RWA"
},
Expand All @@ -716,7 +718,7 @@
},
{
"cell_type": "code",
"execution_count": 78,
"execution_count": null,
"metadata": {
"id": "0YofwHdN0pxa"
},
Expand All @@ -739,7 +741,7 @@
},
{
"cell_type": "code",
"execution_count": 79,
"execution_count": null,
"metadata": {
"id": "m2dkmJVCGUia"
},
Expand All @@ -765,7 +767,7 @@
},
{
"cell_type": "code",
"execution_count": 80,
"execution_count": null,
"metadata": {
"id": "5NDMO_7kS6Do"
},
Expand All @@ -789,7 +791,7 @@
},
{
"cell_type": "code",
"execution_count": 81,
"execution_count": null,
"metadata": {
"id": "jwEaj9DnTCVA"
},
Expand Down

0 comments on commit 9e6397b

Please sign in to comment.