Skip to content

Commit

Permalink
Fix SQ algorithm ports usage
Browse files Browse the repository at this point in the history
  • Loading branch information
KodiaqQ committed May 8, 2024
1 parent 359447b commit 44c5617
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nncf/quantization/algorithms/smooth_quant/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def apply(
weight_update_command = self._backend_entity.weight_update_command(node_to_smooth, scaled_weight.data)
transformation_layout.register(weight_update_command)

activations_shape = graph.get_output_edges(source_node)[source_output_port_id].tensor_shape
activations_by_output_id = {e.output_port_id: e for e in graph.get_output_edges(source_node)}
activations_shape = activations_by_output_id[source_output_port_id].tensor_shape
activation_scale = self._calculate_activation_scale(best_scale, activations_shape, nodes, graph)

scale_node_name = self._create_scale_node_name(source_node.node_name, source_output_port_id)
Expand Down

0 comments on commit 44c5617

Please sign in to comment.