mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-30 13:40:46 +08:00
working on trainer docs
This commit is contained in:
1 parent
62d213ab3c
commit
ed91ad6407
1 file changed
+3
-3
@@ -839,7 +839,7 @@ class Trainer(TrainerIOMixin,
|
||||
|
||||
Example::
|
||||
|
||||
# Option 1:
|
||||
# Option 1
|
||||
# run test after fitting
|
||||
trainer = Trainer()
|
||||
model = LightningModule()
|
||||
@@ -847,8 +847,8 @@ class Trainer(TrainerIOMixin,
|
||||
trainer.fit()
|
||||
trainer.test()
|
||||
|
||||
# Option 2:
|
||||
# run test from a model loaded
|
||||
# Option 2
|
||||
# run test from a loaded model
|
||||
model = LightningModule.load_from_checkpoint('path/to/checkpoint.ckpt')
|
||||
trainer = Trainer()
|
||||
|
||||
|
||||
Reference in new issue
Block a user