@@ -71,7 +71,7 @@ def transform(self, model, node):
7171 model .config .parse_name_config (dw_name , dw_layer_config )
7272
7373 # creating the attributes
74- dw_attributes = {k : node .attributes . get ( k , None ) for k in SeperableToDepthwiseAndConv ._dw_attributes }
74+ dw_attributes = {k : node .attributes [ k ] for k in SeperableToDepthwiseAndConv ._dw_attributes if k in node . attributes }
7575
7676 dw_attributes ['use_bias' ] = False
7777
@@ -101,7 +101,7 @@ def transform(self, model, node):
101101 model .config .parse_name_config (pw_name , pw_layer_config )
102102
103103 # creating the attributes
104- pw_attributes = {k : node .attributes . get ( k , None ) for k in SeperableToDepthwiseAndConv ._pw_attributes }
104+ pw_attributes = {k : node .attributes [ k ] for k in SeperableToDepthwiseAndConv ._pw_attributes if k in node . attributes }
105105 pw_attributes ['filt_width' ] = 1
106106 pw_attributes ['filt_height' ] = 1
107107 pw_attributes ['stride_width' ] = 1
@@ -111,7 +111,7 @@ def transform(self, model, node):
111111 pw_attributes ['pad_top' ] = 0
112112 pw_attributes ['pad_bottom' ] = 0
113113 pw_attributes ['in_width' ] = pw_attributes ['out_width' ]
114- pw_attributes ['in_height' ] = pw_attributes [ 'out_height' ]
114+ pw_attributes ['in_height' ] = pw_attributes . get ( 'out_height' , 1 )
115115 pw_attributes ['n_chan' ] = node .get_attr ('n_chan' ) * node .get_attr ('depth_multiplier' )
116116 pw_attributes ['weight_data' ] = node .get_attr ('pointwise_data' )
117117 pw_attributes ['weight_quantizer' ] = node .get_attr ('pointwise_quantizer' )
0 commit comments