Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interest points list in MP to exclude outputs #862

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading