Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
27 Views

Converting a TensorFlow* Model: Cannot find tensorflow module

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_...

 

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
Highlighted
27 Views

Hi Eason,

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

0 Kudos