Skip to content

Commit 96aa600

Browse files
authored
AC: update partial shape parsing (#2994)
1 parent e2c7806 commit 96aa600

File tree

1 file changed

+9
-0
lines changed
  • tools/accuracy_checker/openvino/tools/accuracy_checker

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,15 @@ def parse_partial_shape(partial_shape):
950950
ps = str(partial_shape)
951951
preprocessed = ps.replace('{', '(').replace('}', ')').replace('?', '-1')
952952
if '[' not in preprocessed:
953+
preprocessed = preprocessed.replace('(', '').replace(')', '')
954+
if '..' in preprocessed:
955+
shape_list = []
956+
for dim in preprocessed.split(','):
957+
if '..' in dim:
958+
shape_list.append(string_to_tuple(dim.replace('..', ','), casting_type=int))
959+
else:
960+
shape_list.append(int(dim))
961+
return shape_list
953962
return string_to_tuple(preprocessed, casting_type=int)
954963
shape_list = []
955964
s_pos = 0

0 commit comments

Comments
 (0)