Skip to content

Commit

Permalink
fix list size
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jun 20, 2020
1 parent e1e9680 commit d375e2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def run_pretrain_routine(self, model: LightningModule):

num_loaders = len(self.val_dataloaders)
max_batches = [self.num_sanity_val_steps] * num_loaders
max_batches = [float('inf') for m in max_batches if m == -1]
max_batches = [float('inf') if m == -1 else m for m in max_batches]
eval_results = self._evaluate(model,
self.val_dataloaders,
max_batches,
Expand Down

0 comments on commit d375e2a

Please sign in to comment.