Fix a result shape for a model with a 3d tensor at the output (#7741)
This commit is contained in:
parent
3f0fea5c1b
commit
7fade1e357
@ -36,8 +36,9 @@ def infer_data(data: dict, exec_net: ExecutableNetwork, input_blobs: list, outpu
|
|||||||
result = {}
|
result = {}
|
||||||
|
|
||||||
for blob_name in output_blobs:
|
for blob_name in output_blobs:
|
||||||
batch_size, num_of_dims = exec_net.outputs[blob_name].shape
|
shape = exec_net.outputs[blob_name].shape
|
||||||
result[blob_name] = np.ndarray((matrix_shape[0], num_of_dims))
|
batch_size = shape[0]
|
||||||
|
result[blob_name] = np.ndarray((matrix_shape[0], shape[-1]))
|
||||||
|
|
||||||
slice_begin = 0
|
slice_begin = 0
|
||||||
slice_end = batch_size
|
slice_end = batch_size
|
||||||
|
Loading…
Reference in New Issue
Block a user