Skip to content

Commit 873d288

Browse files
authored
demos/openvino_adapter: align brackets with new PartialShapre representation (#3574)
1 parent 51fad06 commit 873d288

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

demos/common/python/openvino/model_zoo/model_api/adapters/openvino_adapter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ def string_to_tuple(string, casting_type=int):
172172
if not input_tensor.partial_shape.is_dynamic:
173173
return list(input_tensor.shape)
174174
ps = str(input_tensor.partial_shape)
175+
if ps[0] == '[' and ps[-1] == ']':
176+
ps = ps[1:-1]
175177
preprocessed = ps.replace('{', '(').replace('}', ')').replace('?', '-1')
176178
preprocessed = preprocessed.replace('(', '').replace(')', '')
177179
if '..' in preprocessed:

0 commit comments

Comments
 (0)