From 3a86e0fc6c7070b3d2694c2192bdc36d300aa6b0 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 24 Jul 2019 16:23:30 -0400 Subject: [PATCH] added sample input for summary --- pytorch_lightning/root_module/memory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytorch_lightning/root_module/memory.py b/pytorch_lightning/root_module/memory.py index 909f97f119..17fbe99197 100644 --- a/pytorch_lightning/root_module/memory.py +++ b/pytorch_lightning/root_module/memory.py @@ -121,7 +121,7 @@ class ModelSummary(object): df['Type'] = self.layer_types df['Params'] = self.param_nums - if self.model.example_input_array: + if self.model.example_input_array is not None: df.columns.extend(['In_sizes', 'Out_sizes']) df['In_sizes'] = self.in_sizes df['Out_sizes'] = self.out_sizes @@ -134,7 +134,7 @@ class ModelSummary(object): self.get_parameter_sizes() self.get_parameter_nums() - if self.model.example_input_array: + if self.model.example_input_array is not None: self.get_variable_sizes() self.make_summary()