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

Converting Tensorflow Model: pb file to IR

Rashik
Beginner
1,935 Views

I am trying to create IR from frozen inference_graph.pb file for my tensorflow model. But it shows this error-

[ ERROR ] Exception occurred during running replacer "None" (<class
'extensions.front.tf.assign_elimination.AssignAddElimination'>): Data flow edge coming out of
AssignAdd node Adam

I am not sure how to solve it. Please help me

 

0 Kudos
14 Replies
Esteban_D_Intel
Moderator
1,912 Views

Hello Rashik,

Thank you for posting on the Intel® communities.

To better assist you I would appreciate if you could provide the full model or part number of the Intel component that you are using for this design. 


We will be waiting for your response to find the appropriate support for your inquiry.


Esteban D.

Intel Technical Support Technician  


0 Kudos
Rashik
Beginner
1,903 Views

I am using Intel Neural Compute Stick 2. Thank you.

0 Kudos
Esteban_D_Intel
Moderator
1,885 Views

Hello Rashik,

Thank you so much for the information provided.

The thread will be routed to the appropriate support in order to find a resolution to this matter.

Esteban D.

Intel Technical Support Technician


0 Kudos
IntelSupport
Community Manager
1,874 Views

Hi Rashik,

 

Thank you for reaching out to us. If possible, could you share the frozen_inference_graph.pb file here? We would like to replicate this issue on our end.

 

Regards,

Adli


0 Kudos
Rashik
Beginner
1,870 Views

Hello

I have attached the frozen inference_graph.pb file here. Thank you

Regards
Rashik

0 Kudos
Rashik
Beginner
1,867 Views

Sorry I failed to attach the .pb file in the previous reply as .pb file is not supported. I tried to zip the file but it exceeds the maximum file size. if you can give me an email address, I can share the .pb file. Thank you.

 

0 Kudos
IntelSupport
Community Manager
1,860 Views

Hi Rashik,

 

I would suggest you share the file through cloud storage services such as dropbox and google drive. Then, copy and paste the link here.

 

Regards,

Adli


0 Kudos
IntelSupport
Community Manager
1,820 Views

Hi Rashik,

 

Thank you for sharing the file. If possible, could you share additional information regarding:

  • Input shape of the model?
  • Which topology used for training? Is it an SSD model?

 

Regards,

Adli


0 Kudos
Rashik
Beginner
1,817 Views

Hello

  1. The input shape is 256*256
  2. It is not an SSD model. I have used convolutional neutral network (convolution layer, pooling layer, residual unit, ReLU layer, fully connected layer) for image classification.
0 Kudos
IntelSupport
Community Manager
1,795 Views

Hi Rashik,

 

I have replicated the issue using OpenVINO 2020.4 version and OpenVINO 2021.1 version and I’m also seeing the same error in both versions.

 

So, the issue lies with your model. I would suggest you recheck the inference graph file. Make sure you follow the correct instructions on how to freeze a graph.

 

Having said that, step-by-step instructions on how to load a non-frozen model to the model optimizer is available at the following link: https://docs.openvinotoolkit.org/2021.1/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#loading-nonfrozen-models

 

Besides, I am giving a link here which will be helpful for you to solve your issue: https://github.com/openvinotoolkit/openvino/issues/98 

 

Regards,

Adli


0 Kudos
Rashik
Beginner
1,792 Views

Hello

I tried to follow all the instruction provided on how to freeze a graph. If you want, I can share my python code with you.

Another thing, do I need to use the checkpoint file to convert my model? If so, then can you please tell me how to create checkpoint_file.ckpt? Thank you.

Regards
Rashik Shadman

0 Kudos
IntelSupport
Community Manager
1,781 Views

Hi Rashik,

 

One of the ways to load a non-frozen graph to the model optimizer is the 'checkpoint' method. In this case, you need two files, an inference graph file (inference_graph.pb or inference_graph.pbtxt) and a checkpoint file. For more information, please refer to the following link:

https://docs.openvinotoolkit.org/2021.1/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#loading-nonfrozen-models

 

In order to create the checkpoint file, please refer to the following link:

https://www.tensorflow.org/guide/checkpoint#writing_checkpoints

 

Regards,

Adli


0 Kudos
IntelSupport
Community Manager
1,728 Views

Hi Rashik,


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,

Adli


0 Kudos
Reply