We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 774fbc8 commit 9555b66Copy full SHA for 9555b66
site/en/tutorials/distribute/keras.ipynb
@@ -486,7 +486,10 @@
486
},
487
"outputs": [],
488
"source": [
489
- "model.load_weights(tf.train.latest_checkpoint(checkpoint_dir))\n",
+ "import pathlib\n",
490
+ "latest_checkpoint = sorted(pathlib.Path(checkpoint_dir).glob('*'))[-1]\n",
491
+ "\n",
492
+ "model.load_weights(latest_checkpoint)\n",
493
"\n",
494
"eval_loss, eval_acc = model.evaluate(eval_dataset)\n",
495
0 commit comments