Skip to content

Commit

Permalink
fix docs on saving checkpoints manually (#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjordan authored Apr 5, 2020
1 parent b18accc commit 38c5608
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/source/weights_loading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------
Expand Down

0 comments on commit 38c5608

Please sign in to comment.