diff --git a/distiller/summary_graph.py b/distiller/summary_graph.py index 9a74a5f9f058ce46cfaaf0f0b74bbf0855ea38b2..6f6431e804803201a4b3b21539a2a0dc0f3e83c7 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