Skip to content

Commit 1f53d0a

Browse files
committed
save checkpoint as .weights.h5
1 parent 75b2672 commit 1f53d0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/en/tutorials/distribute/keras.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
"# Define the checkpoint directory to store the checkpoints.\n",
364364
"checkpoint_dir = './training_checkpoints'\n",
365365
"# Define the name of the checkpoint files.\n",
366-
"checkpoint_prefix = os.path.join(checkpoint_dir, \"ckpt_{epoch}\")"
366+
"checkpoint_prefix = os.path.join(checkpoint_dir, \"ckpt_{epoch}.weights.h5\")"
367367
]
368368
},
369369
{
@@ -396,7 +396,7 @@
396396
"# Define a callback for printing the learning rate at the end of each epoch.\n",
397397
"class PrintLR(tf.keras.callbacks.Callback):\n",
398398
" def on_epoch_end(self, epoch, logs=None):\n",
399-
" print('\\nLearning rate for epoch {} is {}'.format( epoch + 1, model.optimizer.lr.numpy()))"
399+
" print('\\nLearning rate for epoch {} is {}'.format(epoch + 1, model.optimizer.lr.numpy()))"
400400
]
401401
},
402402
{

0 commit comments

Comments
 (0)