From 38c56081ac23f866bfb00786fbd7d3e947f5cd77 Mon Sep 17 00:00:00 2001 From: Jeremy Jordan <13970565+jeremyjordan@users.noreply.github.com> Date: Sun, 5 Apr 2020 11:10:44 -0400 Subject: [PATCH] fix docs on saving checkpoints manually (#1373) --- docs/source/weights_loading.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/weights_loading.rst b/docs/source/weights_loading.rst index 339469fe33..5f3e4389dd 100644 --- a/docs/source/weights_loading.rst +++ b/docs/source/weights_loading.rst @@ -74,12 +74,14 @@ The Lightning checkpoint also saves the hparams (hyperparams) passed into the Li Manual saving ^^^^^^^^^^^^^ - -To save your own checkpoint call: +You can manually save checkpoints and restore your model from the checkpointed state. .. code-block:: python - model.save_checkpoint(PATH) + model = MyModel(hparams) + trainer.fit(model) + trainer.save_checkpoint("example.ckpt") + new_model = MyModel.load_from_checkpoint(checkpoint_path="example.ckpt") Checkpoint Loading ------------------