Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

MYRIAD resnet doesn't support batch size > 4 ?

Truong__Dien_Hoa
New Contributor II
591 Views

I'm trying to reduce the inference time of resnet50 model. With a NCS and setting batchsize=1, the result is ok (25 FPS) but I want to improve more with setting batchsize = 4. However, When I ran the benchmark example an error appeared.

RuntimeError: Failed to infer shapes for Reshape layer with error: Invalid reshape mask (dim attribute): number of elements in input: [1,1,1,1000] and output: [4,1000] mismatch

I don't see this error with this same model for CPU or GPU.

The error is in the code of creating exe_net

exe = plugin.load(network=net)

 

Anyone can help me on this problem ? Can we use batch size > 1 for MYRIAD ?

Thank you in advance,

 

0 Kudos
2 Replies
Shubha_R_Intel
Employee
591 Views

Dear Dien Hoa:

This is shape infer issue. In OpenVino R5 it is unable to handle that last reshape. 

You can just remove that reshape from IR and get 4D output. It will work.

Thanks !

Shubha

0 Kudos
Truong__Dien_Hoa
New Contributor II
591 Views

Thank you Shubha. I will try to fix the problem as you indicate.

Best regards

0 Kudos
Reply