Fix automatic code generation bug for CNNs

This commit is contained in:
alexmr09
2024-07-27 01:24:25 +03:00
parent 487d3bd3dc
commit db255c8112
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ def decide_mode(network, weight_bit_width, input_uint8 = True):
if(layer_type_name == 'Linear'):
layer_type.append(layer_type_name)
if(layer_type_name == 'Conv2d'):
if(module.groups == module.in_channels):
if(module.groups == module.in_channels and module.groups != 1):
layer_type.append('DepthwiseConv2d')
else:
layer_type.append(layer_type_name)