From bf094a36235bcc5424f1622731dc3f02eedf8149 Mon Sep 17 00:00:00 2001 From: Kuporosova Date: Thu, 8 Oct 2020 18:45:57 +0300 Subject: [PATCH] [IE TOOLS] Support of models with output port in names --- .../tools/cross_check_tool/cross_check_tool.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inference-engine/tools/cross_check_tool/cross_check_tool.py b/inference-engine/tools/cross_check_tool/cross_check_tool.py index 912bbfea91e103..1a216dc5e07a78 100644 --- a/inference-engine/tools/cross_check_tool/cross_check_tool.py +++ b/inference-engine/tools/cross_check_tool/cross_check_tool.py @@ -75,8 +75,15 @@ def get_exec_net(core, net, device): @error_handling('output \'{output}\' addition for network from model \'{model}\'') def get_net_copy_with_output(model: str, output: str, core: IECore): net_copy = get_net(model=model, core=core) + func = ng.function_from_cnn(net_copy) if output not in ['None', None]: - net_copy.add_outputs(output) + # output with port in name is absent in ops list + founded_op = [op for op in func.get_ops() if op.friendly_name == output] + if founded_op: + net_copy.add_outputs(output) + else: + splitted = output.rsplit(".", 1) + net_copy.add_outputs((splitted[0], int(splitted[1]))) return net_copy