Community
cancel
Showing results for 
Search instead for 
Did you mean: 
De_Boeck__Bart
Beginner
579 Views

module 'tensorflow' has no attribute 'NodeDef'

Dear,

 

  The following command

python /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py --input_model saved_model.pb 

results in

Model Optimizer arguments:
Common parameters:
	- Path to the Input Model: 	/home/bart/e27/cross/src/bart/very-deep-convnets-raw-waveforms/TF_Model/tf_model/saved_model.pb
	- Path for generated IR: 	/home/bart/e27/cross/src/bart/very-deep-convnets-raw-waveforms/TF_Model/tf_model/.
	- 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: 	False
	- 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
	- Operations to offload: 	None
	- Patterns to offload: 	None
	- Use the config file: 	None
Model Optimizer version: 	2019.3.0-408-gac8584cb7
[ WARNING ]  
Detected not satisfied dependencies:
	tensorflow: installed: 2.0.0, required: 2.0.0

Please install required versions of components or use install_prerequisites script
/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/install_prerequisites/install_prerequisites_tf.sh
Note that install_prerequisites scripts may install additional components.
[ ERROR ]  -------------------------------------------------
[ ERROR ]  ----------------- INTERNAL ERROR ----------------
[ ERROR ]  Unexpected exception happened.
[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  module 'tensorflow' has no attribute 'NodeDef'
[ ERROR ]  Traceback (most recent call last):
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/main.py", line 298, in main
    return driver(argv)
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/main.py", line 243, in driver
    import mo.pipeline.tf as mo_tf
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/pipeline/tf.py", line 33, in <module>
    from mo.front.tf.extractor import get_tf_edges, tf_op_extractor, tf_op_extractors
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/front/tf/extractor.py", line 26, in <module>
    from mo.front.tf.extractors.native_tf import native_tf_node_extractor
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/front/tf/extractors/native_tf.py", line 17, in <module>
    from mo.front.tf.partial_infer.tf import tf_native_tf_node_infer
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/front/tf/partial_infer/tf.py", line 148, in <module>
    is_input: bool = False):
AttributeError: module 'tensorflow' has no attribute 'NodeDef'

[ ERROR ]  ---------------- END OF BUG REPORT --------------
[ ERROR ]  -------------------------------------------------

 

Is this

Detected not satisfied dependencies: tensorflow: installed: 2.0.0, required: 2.0.0

an indication of an issue?

 

How do I solve the

[ ERROR ]  Unexpected exception happened.
[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  module 'tensorflow' has no attribute 'NodeDef'

error?

 

Thanks,

Bart

0 Kudos
1 Reply
JesusE_Intel
Moderator
579 Views

Hi Bart,

What version of Tensorflow do you have installed? Try installing Tensorflow version 1.14.0.

Regards,

Jesus

Reply