Skip to content

Commit 9e6397b

Browse files
committed
mkdir
1 parent a2a302e commit 9e6397b

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

site/en/tutorials/keras/save_and_load.ipynb

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 54,
14+
"execution_count": null,
1515
"metadata": {
1616
"cellView": "form",
1717
"id": "2pHVBk_seED1"
@@ -33,7 +33,7 @@
3333
},
3434
{
3535
"cell_type": "code",
36-
"execution_count": 55,
36+
"execution_count": null,
3737
"metadata": {
3838
"cellView": "form",
3939
"id": "N_fMsQ-N8I7j"
@@ -136,7 +136,7 @@
136136
},
137137
{
138138
"cell_type": "code",
139-
"execution_count": 56,
139+
"execution_count": null,
140140
"metadata": {
141141
"id": "RzIOVSdnMYyO"
142142
},
@@ -147,7 +147,7 @@
147147
},
148148
{
149149
"cell_type": "code",
150-
"execution_count": 57,
150+
"execution_count": null,
151151
"metadata": {
152152
"id": "7Nm7Tyb-gRt-"
153153
},
@@ -174,7 +174,7 @@
174174
},
175175
{
176176
"cell_type": "code",
177-
"execution_count": 58,
177+
"execution_count": null,
178178
"metadata": {
179179
"id": "9rGfFwE9XVwz"
180180
},
@@ -209,7 +209,7 @@
209209
},
210210
{
211211
"cell_type": "code",
212-
"execution_count": 59,
212+
"execution_count": null,
213213
"metadata": {
214214
"id": "0HZbJIjxyX1S"
215215
},
@@ -260,7 +260,7 @@
260260
},
261261
{
262262
"cell_type": "code",
263-
"execution_count": 61,
263+
"execution_count": null,
264264
"metadata": {
265265
"id": "IFPuhwntH8VH"
266266
},
@@ -297,7 +297,7 @@
297297
},
298298
{
299299
"cell_type": "code",
300-
"execution_count": 62,
300+
"execution_count": null,
301301
"metadata": {
302302
"id": "gXG5FVKFOVQ3"
303303
},
@@ -319,7 +319,7 @@
319319
},
320320
{
321321
"cell_type": "code",
322-
"execution_count": 63,
322+
"execution_count": null,
323323
"metadata": {
324324
"id": "Fp5gbuiaPqCT"
325325
},
@@ -344,7 +344,7 @@
344344
},
345345
{
346346
"cell_type": "code",
347-
"execution_count": 64,
347+
"execution_count": null,
348348
"metadata": {
349349
"id": "2IZxbwiRRSD2"
350350
},
@@ -373,7 +373,7 @@
373373
},
374374
{
375375
"cell_type": "code",
376-
"execution_count": 65,
376+
"execution_count": null,
377377
"metadata": {
378378
"id": "mQF_dlgIVOvq"
379379
},
@@ -382,6 +382,7 @@
382382
"# Include the epoch in the file name (uses `str.format`)\n",
383383
"checkpoint_path = \"training_2/cp-{epoch:04d}.weights.h5\"\n",
384384
"checkpoint_dir = os.path.dirname(checkpoint_path)\n",
385+
"os.mkdir(checkpoint_dir)\n",
385386
"\n",
386387
"batch_size = 32\n",
387388
"\n",
@@ -424,7 +425,7 @@
424425
},
425426
{
426427
"cell_type": "code",
427-
"execution_count": 66,
428+
"execution_count": null,
428429
"metadata": {
429430
"id": "p64q3-V4sXt0"
430431
},
@@ -435,7 +436,7 @@
435436
},
436437
{
437438
"cell_type": "code",
438-
"execution_count": 67,
439+
"execution_count": null,
439440
"metadata": {
440441
"id": "1AN_fnuyR41H"
441442
},
@@ -462,7 +463,7 @@
462463
},
463464
{
464465
"cell_type": "code",
465-
"execution_count": 68,
466+
"execution_count": null,
466467
"metadata": {
467468
"id": "3M04jyK-H3QK"
468469
},
@@ -514,13 +515,14 @@
514515
},
515516
{
516517
"cell_type": "code",
517-
"execution_count": 69,
518+
"execution_count": null,
518519
"metadata": {
519520
"id": "R7W5plyZ-u9X"
520521
},
521522
"outputs": [],
522523
"source": [
523524
"# Save the weights\n",
525+
"os.mkdir('./checkpoints')\n",
524526
"model.save_weights('./checkpoints/my_checkpoint.weights.h5')\n",
525527
"\n",
526528
"# Create a new model instance\n",
@@ -585,7 +587,7 @@
585587
},
586588
{
587589
"cell_type": "code",
588-
"execution_count": 70,
590+
"execution_count": null,
589591
"metadata": {
590592
"id": "3f55mAXwukUX"
591593
},
@@ -610,7 +612,7 @@
610612
},
611613
{
612614
"cell_type": "code",
613-
"execution_count": 71,
615+
"execution_count": null,
614616
"metadata": {
615617
"id": "HyfUMOZwux_-"
616618
},
@@ -633,7 +635,7 @@
633635
},
634636
{
635637
"cell_type": "code",
636-
"execution_count": 72,
638+
"execution_count": null,
637639
"metadata": {
638640
"id": "8BT4mHNIvMdW"
639641
},
@@ -666,7 +668,7 @@
666668
},
667669
{
668670
"cell_type": "code",
669-
"execution_count": 76,
671+
"execution_count": null,
670672
"metadata": {
671673
"id": "sI1YvCDFzpl3"
672674
},
@@ -692,7 +694,7 @@
692694
},
693695
{
694696
"cell_type": "code",
695-
"execution_count": 77,
697+
"execution_count": null,
696698
"metadata": {
697699
"id": "sq8fPglI1RWA"
698700
},
@@ -716,7 +718,7 @@
716718
},
717719
{
718720
"cell_type": "code",
719-
"execution_count": 78,
721+
"execution_count": null,
720722
"metadata": {
721723
"id": "0YofwHdN0pxa"
722724
},
@@ -739,7 +741,7 @@
739741
},
740742
{
741743
"cell_type": "code",
742-
"execution_count": 79,
744+
"execution_count": null,
743745
"metadata": {
744746
"id": "m2dkmJVCGUia"
745747
},
@@ -765,7 +767,7 @@
765767
},
766768
{
767769
"cell_type": "code",
768-
"execution_count": 80,
770+
"execution_count": null,
769771
"metadata": {
770772
"id": "5NDMO_7kS6Do"
771773
},
@@ -789,7 +791,7 @@
789791
},
790792
{
791793
"cell_type": "code",
792-
"execution_count": 81,
794+
"execution_count": null,
793795
"metadata": {
794796
"id": "jwEaj9DnTCVA"
795797
},

0 commit comments

Comments
 (0)