Community
cancel
Showing results for 
Search instead for 
Did you mean: 
guo__michael
Beginner
68 Views

Cannot reshape weights to kernel shape

Hi All,

   I am trying to convert a mxnet model to IR. but meet some error regarding shape. the error message is as below. the command is python3 mo_mxnet.py --input_model model_algo_1-0000.params --input_shape [1,3,512,512] --data_type=FP16 . enclosed is corresponding json file. Pls comment how to fix the issue.

Model Optimizer version:     2019.3.0-375-g332562022
[ ERROR ]  Size of weights 221184 does not match kernel shape: [  36 2048    3    3]
    Possible reason is wrong channel number in input shape

[ ERROR ]  Cannot infer shapes or values for node "_plus15_cls_pred_conv".
[ ERROR ]  Cannot reshape weights to kernel shape
[ ERROR ]
[ ERROR ]  It can happen due to bug in custom shape infer function <function Convolution.infer at 0x7f4a93621e18>.
[ 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 ]  Cannot reshape weights to kernel shape
Stopped shape/value propagation at "_plus15_cls_pred_conv" node.
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.
Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Cannot reshape weights to kernel shape
Stopped shape/value propagation at "_plus15_cls_pred_conv" node.
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.

0 Kudos
1 Reply
Arthonzl__Mark
Beginner
68 Views

Sorry I don't have better experience of it. Hope someone will help you. Thanks!

Reply