- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I am using OpenVINO version 2021.4. I have created a simple model with TensorFlow version 2.4 that has four inputs (input_shape 1,4). I have converted it to a frozen model, but the conversion to IR format fails.
This is the command:
python "C:\Program Files (x86)\Intel\openvino_2021\deployment_tools\model_optimizer\mo.py"
--input_model "C:\Users\tuhnus\pipari_model\frozen_model.pb" ^
--input "input_1" ^
--output "Identity" ^
--input_shape "[1,4]" ^
--data_type FP16 ^
--output_dir "D:\AI_Model\trained_models\openvino_ir"
This is the signature:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_1'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 4)
name: serving_default_input_1:0
The given SavedModel SignatureDef contains the following output(s):
outputs['dense_2'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 1)
name: StatefulPartitionedCall:0
Method name is: tensorflow/serving/predict
What do I have to change so that the model can be converted?
@model_optimizer
Tuhnu
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tuhnu,
Thanks for reaching out. To resolve the IR conversion failure, try the following steps:
1. Set the Correct Input Shape. Your model expects a dynamic batch size (-1,4), but OpenVINO may require a fixed size. Try:
- --input_shape "[1,4]" for a static batch of 1.
- If OpenVINO allows dynamic batch size, use "[?,4]".
2. Ensure Input/Output Names Match.TensorFlow uses specific input/output names. Use the correct names in your command:
--input "serving_default_input_1"
--output "StatefulPartitionedCall"
3. Verify the Model is Frozen. Ensure the model is properly frozen and check tensor names with:
print([tensor.name for tensor in frozen_func.inputs])
print([tensor.name for tensor in frozen_func.outputs])
4. Use the --saved_model_dir Option.If possible, convert the entire SavedModel directory instead of using a .pb file.
OpenVINO 2021.4 has limited support for TensorFlow 2.4. Upgrading to OpenVINO 2023.x may improve compatibility. If the issue persists, share the exact error message for further assistance.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tuhnu,
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.
Regards,
Aznie

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page