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.

OpenVINO Reshape Issue



I am trying to reshape the batch size of a network, using Reshape API. While executing, I am getting the following issue :

RuntimeError: Failed to infer shapes for FullyConnected layer, New shapes not matching weights size.

I didn't understand the exact reason for the error. As in Shape Inference Documentation, FullyConnected is one of the supported layers. Does there any issue with Reshape Function or something went wrong in my understanding.


Thank You.


0 Kudos
1 Reply

Dear Ramachandruni, Anjaneya Srujit,

Sorry that you are having trouble. Is this for the CPU ?

Do you think possibly your model is breaking one of these rules ? Source :


Shape Inference is a preview feature with a set of limitations:

Reshape layer might not work correctly for TensorFlow* models if its shape and parameters are dynamically depend on other layers (for example, for the pre-trainned vehicle-license-plate-detection-barrier-0107 model).

Models with fixed dimensions in the dim attribute of the Reshape layer can't be resized.

Shape inference for Interp layer works for almost all cases, except for Caffe models with fixed width and height parameters (for example, semantic-segmentation-adas-0001).

If you would like me to debug this further please attach your model and inference code as a *.zip. If you'd prefer to do this privately let me know and I will PM you.

Let me know,



0 Kudos