Skip to content

Commit 2a4f315

Browse files
author
Anna Grebneva
authored
Fixed set_input_and_output in case exec_network is not set (#3011)
1 parent b71c776 commit 2a4f315

File tree

1 file changed

+4
-3
lines changed
  • tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators

1 file changed

+4
-3
lines changed

tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/base_models.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,14 @@ def automatic_model_search(self, network_info):
195195
return model, weights
196196

197197
def set_input_and_output(self):
198-
has_info = hasattr(self.exec_network, 'input_info')
199-
input_info = self.exec_network.input_info if has_info else self.exec_network.inputs
198+
network = self.exec_network if self.exec_network is not None else self.network
199+
has_info = hasattr(network, 'input_info')
200+
input_info = network.input_info if has_info else network.inputs
200201
input_blob = next(iter(input_info))
201202
with_prefix = input_blob.startswith(self.default_model_suffix)
202203
if self.input_blob is None or with_prefix != self.with_prefix:
203204
if self.output_blob is None:
204-
output_blob = next(iter(self.exec_network.outputs))
205+
output_blob = next(iter(network.outputs))
205206
else:
206207
output_blob = (
207208
'_'.join([self.default_model_suffix, self.output_blob])

0 commit comments

Comments
 (0)