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

Having trouble converting EfficientNetV2-B0 to IR Format


I was training EfficientNetV2-B0 using this link:


Then I tried converting my model using the command below. Please help me I'm a beginner on this tool. Thanks

(openvino) C:\random\New folder\openvino\tools\mo>python --input_model effnet.pb --input_shape [1,3,244,244]"
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: C:\random\New folder\openvino\tools\mo\effnet.pb
- Path for generated IR: C:\random\New folder\openvino\tools\mo\.
- IR output name: effnet
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: Not specified, inherited from the model
- Output layers: Not specified, inherited from the model
- Input shapes: [1,3,244,244]
- Source layout: Not specified
- Target layout: Not specified
- Layout: Not specified
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- User transformations: Not specified
- Reverse input channels: False
- Enable IR generation for fixed input shape: False
- Use the transformations config file: None
Advanced parameters:
- Force the usage of legacy Frontend of Model Optimizer for model conversion into IR: False
- Force the usage of new Frontend of Model Optimizer for model conversion into IR: False
TensorFlow specific parameters:
- Input model in text protobuf format: False
- Path to model dump for TensorBoard: None
- List of shared libraries with TensorFlow custom layers implementation: None
- Update the configuration file with input/output node names: None
- Use configuration file used to generate the model with Object Detection API: None
- Use the config file: None
OpenVINO runtime found in: C:\random\New folder\openvino\tools\mo\openvino
OpenVINO runtime version: 2022.1.0-7019-cdb9bec7210-releases/2022/1
Model Optimizer version: custom_HEAD_cdb9bec7210f8c24fde3e416c7ada820faaaa23e
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID (<class ''>)":
[ ERROR ] Traceback (most recent call last):
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\utils\", line 278, in apply_transform
for_graph_and_each_sub_graph_recursively(graph, replacer.find_and_replace_pattern)
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\middle\", line 46, in for_graph_and_each_sub_graph_recursively
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\back\", line 166, in find_and_replace_pattern
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\back\", line 131, in find_and_replace_pattern
resolve_convolution_with_group(node, group, ir_version='V7')
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\back\", line 31, in resolve_convolution_with_group
assert weights_shape[0] % group == 0

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\", line 533, in main
ret_code = driver(argv)
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\", line 489, in driver
graph, ngraph_function = prepare_ir(argv)
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\", line 407, in prepare_ir
graph = unified_pipeline(argv)
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\pipeline\", line 13, in unified_pipeline
class_registration.apply_replacements(graph, [
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\utils\", line 328, in apply_replacements
apply_replacements_list(graph, replacers_order)
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\utils\", line 314, in apply_replacements_list
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\utils\", line 112, in wrapper
function(*args, **kwargs)
File "C:\random\New folder\openvino\tools\mo\openvino\tools\mo\utils\", line 302, in apply_transform
raise Exception('Exception occurred during running replacer "{} ({})": {}'.format(
Exception: Exception occurred during running replacer "REPLACEMENT_ID (<class ''>)":

[ ERROR ] ---------------- END OF BUG REPORT --------------
[ ERROR ] -------------------------------------------------

0 Kudos
2 Replies
Community Manager

Hi Maryjo,


The --input_shape argument value must base on the order of dimensions and it depends on the framework input layout of a model. For a TensorFlow model the layout is [N,H,W,C].

I'm able to convert your model using the command below:

mo --input_model effnet.pb --input_shape [1,244,244,3] --reverse_input_channels








0 Kudos
Community Manager

Hi Maryjo,

This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.



0 Kudos