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.
6517 Discussions

Problem Regarding Input Shape Conversion of vgg16 CNN Model in the OpenVINO 2022.1Version

rico22
New Contributor I
680 Views

Hi, everyone.  I am using the Intel OpenVINO 2022.1 on Windows OS for my project. I am trying to convert the input data shape of vgg16 CNN model from [1,3,224,224] to [2,3,300,300]. I tried to use the following command:

 

mo --input_model <path_to_model_directory>\vgg16.caffemodel --input data --input_shape [2,3,300,300] -o <path_to_vgg16_fp32_optimized_model_directory>

I went through the online documentation and followed every step. However, it showed me errors, such as:

OpenVINO runtime found in: C:\Program Files (x86)\Intel\openvino_2022\python\python3.7\openvino
OpenVINO runtime version: 2022.1.0-7019-cdb9bec7210-releases/2022/1
Model Optimizer version: 2022.1.0-7019-cdb9bec7210-releases/2022/1
[ ERROR ] Cannot infer shapes or values for node "fc6/WithoutBiases".
[ ERROR ] MatMul input shapes are incorrect. COL_INDEX_DIMs are not equal. Node: fc6/WithoutBiases. Shapes: [masked_array(data=[ 2, 51200],
mask=False,
fill_value=-1000000007,
dtype=int64), masked_array(data=[25088, 4096],
mask=False,
fill_value=-1000000007,
dtype=int64)]
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function MatMul.infer at 0x0000024CFF9BCC18>.
[ ERROR ] Or because the node inputs have incorrect values/shapes.
[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
[ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information.
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'openvino.tools.mo.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "fc6/WithoutBiases" node.
For more information please refer to Model Optimizer FAQ, question #38. (https://docs.openvino.ai/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=38#question-38)

I don't know what's happening. Can you guys please help me out? Thanks!

0 Kudos
2 Replies
rico22
New Contributor I
679 Views

The first error is 'Cannot infer shapes or values for node "fc6/WithoutBiases". What does it mean? OpenVINO supports Fully Connected layers, doesn't it?

 

 
[ ERROR ] Cannot infer shapes or values for node "fc6/WithoutBiases".
[ ERROR ] MatMul input shapes are incorrect. COL_INDEX_DIMs are not equal. Node: fc6/WithoutBiases. Shapes: [masked_array(data=[ 2, 51200],
mask=False,
fill_value=-1000000007,
dtype=int64), masked_array(data=[25088, 4096],
mask=False,
fill_value=-1000000007,
dtype=int64)]
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function MatMul.infer at 0x0000024CFF9BCC18>.
[ ERROR ] Or because the node inputs have incorrect values/shapes.
[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
[ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information.
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'openvino.tools.mo.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "fc6/WithoutBiases" node.
For more information please refer to Model Optimizer FAQ, question #38. (https://docs.openvino.ai/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=38#question-38)

0 Kudos
IntelSupport
Community Manager
645 Views

Hi Rico22,

 

Thanks for reaching out.

 

I noticed you have submitted the same question on our GitHub page. I will close this case and we will continue providing support for your question in this GitHub thread:

https://github.com/openvinotoolkit/openvino/issues/15867

 

 

Regards,

Aznie


0 Kudos
Reply