Fix a result shape for a model with a 3d tensor at the output (#7741)

This commit is contained in:
Dmitry Pigasin
2021-09-30 16:58:11 +03:00
committed by GitHub
parent 3f0fea5c1b
commit 7fade1e357

View File

@@ -36,8 +36,9 @@ def infer_data(data: dict, exec_net: ExecutableNetwork, input_blobs: list, outpu
result = {}
for blob_name in output_blobs:
batch_size, num_of_dims = exec_net.outputs[blob_name].shape
result[blob_name] = np.ndarray((matrix_shape[0], num_of_dims))
shape = exec_net.outputs[blob_name].shape
batch_size = shape[0]
result[blob_name] = np.ndarray((matrix_shape[0], shape[-1]))
slice_begin = 0
slice_end = batch_size