diff --git a/model_compression_toolkit/core/common/mixed_precision/mixed_precision_candidates_filter.py b/model_compression_toolkit/core/common/mixed_precision/mixed_precision_candidates_filter.py index 9c5d02f51..9b239e30e 100644 --- a/model_compression_toolkit/core/common/mixed_precision/mixed_precision_candidates_filter.py +++ b/model_compression_toolkit/core/common/mixed_precision/mixed_precision_candidates_filter.py @@ -48,8 +48,8 @@ def filter_candidates_for_mixed_precision(graph: Graph, # Running mixed precision for weights compression only - # filter out candidates activation only configurable node weights_conf = graph.get_weights_configurable_nodes(fw_info) - nodes = [n for n in graph.get_activation_configurable_nodes() if n not in weights_conf] - for n in nodes: + activation_configurable_nodes = [n for n in graph.get_activation_configurable_nodes() if n not in weights_conf] + for n in activation_configurable_nodes: base_cfg_nbits = n.get_qco(tpc).base_config.activation_n_bits filtered_conf = [c for c in n.candidates_quantization_cfg if c.activation_quantization_cfg.enable_activation_quantization and @@ -64,8 +64,8 @@ def filter_candidates_for_mixed_precision(graph: Graph, # Running mixed precision for activation compression only - # filter out candidates weights only configurable node activation_conf = graph.get_activation_configurable_nodes() - nodes = [n for n in graph.get_weights_configurable_nodes(fw_info) if n not in activation_conf] - for n in nodes: + weight_configurable_nodes = [n for n in graph.get_weights_configurable_nodes(fw_info) if n not in activation_conf] + for n in weight_configurable_nodes: kernel_attr = graph.fw_info.get_kernel_op_attributes(n.type)[0] base_cfg_nbits = n.get_qco(tpc).base_config.attr_weights_configs_mapping[kernel_attr].weights_n_bits filtered_conf = [c for c in n.candidates_quantization_cfg if