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

Trouble with converting Efficientnet B0 to IR format

Pritesh156
Beginner
607 Views

I managed to convert my InceptionV3 model but im facing some issues with Efficientnet b0. I tried adding an --input_shape argument but its raised another error. So Im not how to fix this. 

 

Error log:

[ WARNING ] Failed to parse a tensor with Unicode characters. Note that Inference Engine does not support string literals, so the string constant should be eliminated from the graph.
[ WARNING ] Failed to parse a tensor with Unicode characters. Note that Inference Engine does not support string literals, so the string constant should be eliminated from the graph.
[ WARNING ] The model contains input(s) with partially defined shapes: name="serving_default_input_2" shape="[-1, 256, 256, 3]". Starting from the 2022.1 release the Model Optimizer can generate an IR with partially defined input shapes ("-1" dimension in the TensorFlow model or dimension with string value in the ONNX model). Some of the OpenVINO plugins require model input shapes to be static, so you should call "reshape" method in the Inference Engine and specify static input shapes. For optimal performance, it is still recommended to update input shapes with fixed ones using "--input" or "--input_shape" command-line parameters.
[ ERROR ] Cannot infer shapes or values for node "StatefulPartitionedCall".
[ ERROR ] Error converting shape to a TensorShape: Failed to convert 'masked_array(data=[--, 256, 256, 3],
mask=[ True, False, False, False],
fill_value=-1000000007,
dtype=int64)' to a shape: 'masked'could not be converted to a dimension. A shape should either be single dimension (e.g. 10), or an iterable of dimensions (e.g. [1, 10, None])..
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function tf_native_tf_node_infer at 0x0000027178AE2820>.
[ 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 "StatefulPartitionedCall" node.

0 Kudos
2 Replies
Peh_Intel
Moderator
575 Views

Hi Pritesh,


Thanks for reaching out to us.


We are aware about your encountered error. Here is the previous discussion about the same issue.


There are some layers in the custom EfficientNet B0 model that are not yet compatible with Model Optimizer architecture and our development team is working to enable this. However, we are unable to comment on any timeline of when it will be enabled.

 

For your reference, Intel provides pre-trained EfficientNet models from the Open Model Zoo that may be of interest to you.

 

·      efficientnet-b0

·      efficientnet-v2-b0

·      efficientnet-v2-s



Regards,

Peh


0 Kudos
Peh_Intel
Moderator
553 Views

Hi Pritesh,


Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored. 



Regards,

Peh


0 Kudos
Reply