fix max_epochs setup in basic example (#1105)

tested only for the CPU version
This commit is contained in:
Ondrej Platek 2020-03-12 17:42:52 +01:00 committed by GitHub
parent fb27a771f8
commit 1383f64a5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def main(hparams):
# ------------------------
# 2 INIT TRAINER
# ------------------------
trainer = pl.Trainer()
trainer = pl.Trainer(max_epochs=hparams.epochs)
# ------------------------
# 3 START TRAINING

View File

@ -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