mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
Update Checkpointing.md (#83)
* Update Checkpointing.md Modified import for ModelCheckpoint. * Update Checkpointing.md
This commit is contained in:
committed by
William Falcon
parent
dd0db4aba2
commit
09d4475cc7
@@ -1,11 +1,11 @@
|
|||||||
Lightning can automate saving and loading checkpoints.
|
i Lightning can automate saving and loading checkpoints.
|
||||||
|
|
||||||
---
|
---
|
||||||
### Model saving
|
### Model saving
|
||||||
To enable checkpointing, define the checkpoint callback and give it to the trainer.
|
To enable checkpointing, define the checkpoint callback and give it to the trainer.
|
||||||
|
|
||||||
``` {.python}
|
``` {.python}
|
||||||
from pytorch_lightning.utils.pt_callbacks import ModelCheckpoint
|
from pytorch_lightning.callbacks import ModelCheckpoint
|
||||||
|
|
||||||
checkpoint_callback = ModelCheckpoint(
|
checkpoint_callback = ModelCheckpoint(
|
||||||
filepath='/path/to/store/weights.ckpt',
|
filepath='/path/to/store/weights.ckpt',
|
||||||
|
|||||||
Reference in New Issue
Block a user