diff --git a/model-optimizer/extensions/middle/PreserveRuntimeInfo.py b/model-optimizer/extensions/middle/PreserveRuntimeInfo.py index f7980277ac7625..b19435174fc39c 100644 --- a/model-optimizer/extensions/middle/PreserveRuntimeInfo.py +++ b/model-optimizer/extensions/middle/PreserveRuntimeInfo.py @@ -66,8 +66,6 @@ def preserve_rt_info(graph: Graph): # source mode is used to keep tensor names at Parameter node op.out_port(0).get_connection().insert_node(transpose, "source") - transpose.infer(transpose) - if op.has_valid('permute_attrs'): del op['permute_attrs'] if op.out_node(0).has_valid('permutation'): @@ -91,9 +89,6 @@ def preserve_rt_info(graph: Graph): op.rt_info.info[('old_api_map', old_api_map.get_version())] = old_api_map op.rt_info.info[('old_api_map', old_api_map.get_version())].old_api_transpose_result(permutation.perm) - if in_data_node.has_valid('permutation'): - del in_data_node['permutation'] - # keep result in the framework format transpose = create_op_node_with_second_input(graph, Transpose, permutation.inv) # preserve output node name as it is used as output name in legacy IE API @@ -101,5 +96,3 @@ def preserve_rt_info(graph: Graph): in_node.name += "/prev" prev_node_out_port.get_connection().insert_node(transpose) - in_node.infer(in_node) - transpose.infer(transpose) diff --git a/model-optimizer/unit_tests/extensions/middle/PreserveRuntimeInfo_test.py b/model-optimizer/unit_tests/extensions/middle/PreserveRuntimeInfo_test.py index 9350036051caab..f1fa9fe5131e5a 100644 --- a/model-optimizer/unit_tests/extensions/middle/PreserveRuntimeInfo_test.py +++ b/model-optimizer/unit_tests/extensions/middle/PreserveRuntimeInfo_test.py @@ -79,7 +79,6 @@ def test_transpose_insert(self, nhwc_to_nchw_order, nchw_to_nhwc_order, add_perm self.assertFalse(param_node.has_valid('permute_attrs')) self.assertFalse(param_node.out_node(0).has_valid('permutation')) - self.assertFalse(result_node.in_node(0).has_valid('permutation')) if add_permutation_attrs: rt_info = param_node.rt_info.info