From 9b5e8dec11bb8aa088639f1811148a8e2ddde83a Mon Sep 17 00:00:00 2001 From: Roman Kazantsev Date: Mon, 8 Jun 2020 17:38:18 +0500 Subject: [PATCH] Fix clean-up for transformations Signed-off-by: Roman Kazantsev --- model-optimizer/extensions/back/SpecialNodesFinalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model-optimizer/extensions/back/SpecialNodesFinalization.py b/model-optimizer/extensions/back/SpecialNodesFinalization.py index d972545807157c..020ef5f28865d4 100644 --- a/model-optimizer/extensions/back/SpecialNodesFinalization.py +++ b/model-optimizer/extensions/back/SpecialNodesFinalization.py @@ -160,7 +160,7 @@ def replace_pattern(graph: Graph, match: dict): nodes_to_remove = [result_node.id] # in case only const data consumer that is the result node, remove the whole sub-graph - if len(const_data_node.out_nodes()) == 1: + if len(const_node.out_port(0).get_destinations()) == 1: nodes_to_remove.append(const_node.id) nodes_to_remove.append(const_data_node.id)