From 95b9f4ad2166101612d643fee03662bd8e488b94 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Thu, 25 Jun 2020 10:11:19 -0400 Subject: [PATCH] fix 2333 --- pytorch_lightning/trainer/trainer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index 52406313f8b51..712a11fd3777f 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -1193,7 +1193,8 @@ def test( self.teardown('test') if self.is_function_implemented('teardown'): - self.model.teardown('test') + model_ref = self.get_model() + model_ref.teardown('test') def check_model_configuration(self, model: LightningModule): r"""