Skip to content

Commit

Permalink
Fix interest points list in MP to exclude outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ofir Gordon authored and Ofir Gordon committed Nov 21, 2023
1 parent 6753bce commit 953c2d3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,8 @@ def get_mp_interest_points(graph: Graph,

interest_points_nodes = bound_num_interest_points(ip_nodes, num_ip_factor)

# We add output layers of the model to interest points
# in order to consider the model's output in the distance metric computation (and also to make sure
# all configurable layers are included in the configured mp model for metric computation purposes)
output_nodes = get_output_nodes_for_metric(graph)
# We exclude output nodes from the set of interest points since they are used separately in the sensitivity evaluation.
output_nodes = [n.node for n in graph.get_outputs()]

interest_points = [n for n in interest_points_nodes if n not in output_nodes]

Expand Down

0 comments on commit 953c2d3

Please sign in to comment.