From 61dfc8284e946ccd166792ab4468f3c08765ce81 Mon Sep 17 00:00:00 2001
From: Neta Zmora <neta.zmora@intel.com>
Date: Sun, 27 Oct 2019 12:19:15 +0200
Subject: [PATCH] Fix commit c2052b2

The error logs should only be emitted when there's an error...
---
 distiller/summary_graph.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/distiller/summary_graph.py b/distiller/summary_graph.py
index 9a74a5f..6f6431e 100755
--- a/distiller/summary_graph.py
+++ b/distiller/summary_graph.py
@@ -328,11 +328,10 @@ class SummaryGraph(object):
                 try:
                     n_ifm = self.param_shape(conv_in)[1]
                     n_ofm = self.param_shape(conv_out)[1]
+                except IndexError:
                     msglogger.error("An input to a Convolutional layer is missing shape information.")
                     msglogger.error("For details see https://github.com/NervanaSystems/distiller/issues/360")
-                except IndexError:
-                    n_ifm = 0
-                    n_ofm = 0
+                    n_ifm = n_ofm = 0
 
                 # MACs = #IFM * #OFM
                 op['attrs']['MACs'] = n_ofm * n_ifm
-- 
GitLab