File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
demos/common/python/openvino/model_zoo/model_api/models Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -112,12 +112,9 @@ def _get_inputs(self):
112
112
return image_blob_names , image_info_blob_names
113
113
114
114
def set_input_shape (self ):
115
- shapes = []
116
- for name in self .image_blob_names :
117
- shapes .append (self .inputs [name ].shape )
118
- for i in range (1 , len (shapes )):
119
- if shapes [i ] != shapes [i - 1 ]:
120
- raise WrapperError (self .__model__ , 'Image inputs have incompatible shapes: {}' .format (shapes ))
115
+ shapes = [tuple (self .inputs [name ].shape ) for name in self .image_blob_names ]
116
+ if len (set (shapes )) != 1 :
117
+ raise WrapperError (self .__model__ , 'Image inputs have incompatible shapes: {}' .format (shapes ))
121
118
return shapes [0 ]
122
119
123
120
def _get_outputs (self ):
You can’t perform that action at this time.
0 commit comments