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.

Converting a TensorFlow* Model: Cannot find tensorflow module

chen__eason
Beginner
427 Views

I am following the link to "Converting TensorFlow*-Slim Image Classification Model Library Models"

https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_Slim_Library_Models.html#example_of_an_inception_v1_model_conversion

 

I have a problem when I doing:

python3 <MODEL_OPTIMIZER_INSTALL_DIR>/mo/utils/summarize_graph.py --input_model ./inception_v1_inference_graph.pb

The error message is

Traceback (most recent call last):
  File "/opt/intel/openvino/deployment_tools/model_optimizer/mo/utils/summarize_graph.py", line 23, in <module>
    import tensorflow as tf
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 35, in <module>
    from tensorflow._api.v1 import compat
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/_api/v1/compat/__init__.py", line 22, in <module>
    from tensorflow._api.v1.compat import v2
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/_api/v1/compat/v2/__init__.py", line 303, in <module>
    from tensorboard.summary._tf import summary
  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/utils/tensorboard.py", line 25, in <module>
    def dump_for_tensorboard(graph_def: tf.GraphDef, logdir: str):
AttributeError: module 'tensorflow' has no attribute 'GraphDef'
 

It seems like the tensorflow module cannot be found.

I have done the install_prerequisites.sh, and the verification of demo_squeezenet_download_convert_run.sh is OK.

 

Any suggestion would be appreciated.

Thanks

0 Kudos
1 Reply
HemanthKum_G_Intel
427 Views

Hi Eason,

This is Tensorflow's GraphDef compatibility issue. Try to install and use Tensorflow version 1.12

0 Kudos
Reply