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

Error while converting tensorflow 2.x saved_model model

Aditya_K_Intel
Employee
640 Views

C:\OpenVINO\openvino_2021.3.394\deployment_tools\model_optimizer>python mo_tf.py --saved_model_dir "C:\Users\adityaku\OneDrive - Intel Corporation\Documents\Projects\Epoxy\Phase1.4\DL_Pathfinding\inception-resnet_96\model" --output_dir "C:\Users\adityaku\OneDrive - Intel Corporation\Documents\Projects\Epoxy\Phase1.4\DL_Pathfinding\inception-resnet_96"
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: None
- Path for generated IR: C:\Users\adityaku\OneDrive - Intel Corporation\Documents\Projects\Epoxy\Phase1.4\DL_Pathfinding\inception-resnet_96
- IR output name: saved_model
- 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: Not specified, inherited from the model
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: None
- Reverse input channels: 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
- Inference Engine found in: C:\OpenVINO\openvino_2021.3.394\python\python3.6\openvino
Inference Engine version: 2.1.2021.3.0-2787-60059f2c755-releases/2021/3
Model Optimizer version: 2021.3.0-2787-60059f2c755-releases/2021/3
[ 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.
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.load.tf.loader.TFLoader'>): Unexpected exception happened during extracting attributes for node Const_204.
Original exception message: 'ascii' codec can't decode byte 0x94 in position 1: ordinal not in range(128)

0 Kudos
2 Replies
Peh_Intel
Moderator
611 Views

Hi Aditya,


Thanks for reaching out to us.


For your information, TensorFlow 2 SavedModel format strictly requires the 2.x version of TensorFlow installed in the environment for conversion to the Intermediate Representation (IR).


I noticed that you’re using OpenVINO™ version 2021.3.394 and Python 3.6. Please make sure you have run install_prerequisites_tf2.bat batch file separately instead of just running install_prerequisites.bat batch file. This is because running install_prerequisites.bat batch file in OpenVINO™ version 2021.3.394 will configure the Model Optimizer for TensorFlow 1 if Python version is earlier than 3.8.


If the error persists, we would like to request your model for further investigation. Please share your assets, variables, saved_model.pb files and any relevant files. You can send them privately to me if you do not want to share them in public.



Regards,

Peh


0 Kudos
Peh_Intel
Moderator
538 Views

Hi Aditya,


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