Fix extracting leaky activation from model table
@@ -2849,6 +2849,8 @@ def extract_conv_layer(layer_table):
if 'trunc_fact' in conv_layer_config.keys():
conv_layer_config['truncation_factor'] = conv_layer_config['trunc_fact']
del conv_layer_config['trunc_fact']
+ if conv_layer_config.get('act') == 'Leaky Activation function':
+ conv_layer_config['act'] = 'Leaky'
dl_numval = layer_table['_DLNumVal_']
if dl_numval[layer_table['_DLKey1_'] == 'convopts.no_bias'].any():
@@ -2924,6 +2926,8 @@ def extract_batchnorm_layer(layer_table):
bn_layer_config = dict()
bn_layer_config.update(get_str_configs(['act'], 'bnopts', layer_table))
bn_layer_config['name'] = layer_table['_DLKey0_'].unique()[0]
+ if bn_layer_config.get('act') == 'Leaky Activation function':
+ bn_layer_config['act'] = 'Leaky'
layer = BN(**bn_layer_config)
return layer
@@ -3023,6 +3027,8 @@ def extract_fc_layer(layer_table):
if 'trunc_fact' in fc_layer_config.keys():
fc_layer_config['truncation_factor'] = fc_layer_config['trunc_fact']
del fc_layer_config['trunc_fact']
+ if fc_layer_config.get('act') == 'Leaky Activation function':
+ fc_layer_config['act'] = 'Leaky'
layer = Dense(**fc_layer_config)
return layer
