Skip to content

Commit

Permalink
[IE TOOLS] Support of models with output port in names (openvinotoolk…
Browse files Browse the repository at this point in the history
  • Loading branch information
akuporos authored Oct 12, 2020
1 parent 9a9b231 commit 9f1b4e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion inference-engine/tools/cross_check_tool/cross_check_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_id 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


Expand Down

0 comments on commit 9f1b4e0

Please sign in to comment.