mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
fix max_epochs setup in basic example (#1105)
tested only for the CPU version
This commit is contained in:
@@ -28,7 +28,7 @@ def main(hparams):
|
||||
# ------------------------
|
||||
# 2 INIT TRAINER
|
||||
# ------------------------
|
||||
trainer = pl.Trainer()
|
||||
trainer = pl.Trainer(max_epochs=hparams.epochs)
|
||||
|
||||
# ------------------------
|
||||
# 3 START TRAINING
|
||||
|
||||
@@ -29,6 +29,7 @@ def main(hparams):
|
||||
# 2 INIT TRAINER
|
||||
# ------------------------
|
||||
trainer = pl.Trainer(
|
||||
max_epochs=hparams.epochs,
|
||||
gpus=hparams.gpus,
|
||||
distributed_backend=hparams.distributed_backend,
|
||||
use_amp=hparams.use_16bit
|
||||
|
||||
Reference in New Issue
Block a user