Skip to content

Commit bf5f7e2

Browse files
authored
AC: fix tf launcher layout handeling (#3433)
1 parent 0feaae4 commit bf5f7e2

File tree

1 file changed

+2
-3
lines changed
  • tools/accuracy_checker/openvino/tools/accuracy_checker/launcher

1 file changed

+2
-3
lines changed

tools/accuracy_checker/openvino/tools/accuracy_checker/launcher/tf_launcher.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,12 @@ def fit_to_input(self, data, layer_name, layout, precision, template=None):
306306
):
307307
if -1 not in layer_shape:
308308
data = np.resize(data, layer_shape)
309-
310-
if len(np.shape(data)) == len(layout):
309+
if layout is not None and len(np.shape(data)) == len(layout):
311310
data = np.transpose(data, layout)
312311
else:
313312
data = np.array(data)
314313

315-
if len(np.shape(data)) > len(layout):
314+
if layout is not None and len(np.shape(data)) > len(layout):
316315
data = data[0, ...]
317316

318317
return data.astype(precision) if precision else data

0 commit comments

Comments
 (0)