From 63ce8af27cb990ec41267247a2f945e42aa3b053 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 24 Jul 2019 17:23:19 -0400 Subject: [PATCH] added multiple outputs to LightningTestModel --- pytorch_lightning/testing_models/lm_test_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch_lightning/testing_models/lm_test_module.py b/pytorch_lightning/testing_models/lm_test_module.py index 09c12c4d..685bb30b 100644 --- a/pytorch_lightning/testing_models/lm_test_module.py +++ b/pytorch_lightning/testing_models/lm_test_module.py @@ -127,16 +127,16 @@ class LightningTestModel(LightningModule): val_acc = val_acc.unsqueeze(0) # alternate possible outputs to test - if self.trainer.batch_nb % 0 == 0: + if self.trainer.batch_nb % 1 == 0: output = OrderedDict({ 'val_loss': loss_val, 'val_acc': val_acc, }) return output - if self.trainer.batch_nb % 1 == 0: + if self.trainer.batch_nb % 2 == 0: return val_acc - if self.trainer.batch_nb % 2 == 0: + if self.trainer.batch_nb % 3 == 0: output = OrderedDict({ 'val_loss': loss_val, 'val_acc': val_acc,