Skip to content

Commit 7e9ea70

Browse files
authored
AC: fix index error in output postprocessing (#3517)
1 parent 40f4738 commit 7e9ea70

File tree

1 file changed

+2
-1
lines changed
  • tools/accuracy_checker/openvino/tools/accuracy_checker

1 file changed

+2
-1
lines changed

tools/accuracy_checker/openvino/tools/accuracy_checker/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,8 @@ def postprocess_output_name(
954954
preprocessed_output_name = output_name.replace(matches[0], '')
955955
else:
956956
suffix_regex = re.compile(output_name + suffix_ + r'\d+')
957-
preprocessed_output_name = [layer_name for layer_name in outputs if suffix_regex.match(layer_name)][0]
957+
preprocessed_output_name = [layer_name for layer_name in outputs if suffix_regex.match(layer_name)]
958+
preprocessed_output_name = preprocessed_output_name[0] if preprocessed_output_name else ''
958959
if preprocessed_output_name in outputs:
959960
return preprocessed_output_name
960961
if raise_error:

0 commit comments

Comments
 (0)