Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Cui_T_Intel
Employee
192 Views

convert tensorflow(.pb) Resnet50 to intel Openvino IR (.bin and .xml)

Hi ,

 

I am trying to convert Tensorflow model to IR.

 

I run the command:

sudo python3 mo.py --framework tf --input_model /home/tang/Downloads/openvino-test/resnet/pb/resnet50_224.pb  --data_type FP32 --output_dir /home/tang/Downloads/openvino-test/resnet/FP32/ --reverse_input_channels --input_shape [1,224,224,3]

During the process i get this error, AttributeError: module 'tensorflow' has no attribute 'NodeDef' , some details are as follow:

 

Common parameters:
    - Path to the Input Model:     /home/tang/Downloads/openvino-test/resnet/pb/resnet50_224.pb
    - Path for generated IR:     /home/tang/Downloads/openvino-test/resnet/FP32/
    - IR output name:     resnet50_224
    - 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:     [1,224,224,3]
    - 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:     True
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.1.1-83-g28dfbfd
[ 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.1.144/deployment_tools/model_optimizer/mo/main.py", line 312, in main
    return driver(argv)
  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/main.py", line 259, in driver
    import mo.pipeline.tf as mo_tf
  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/pipeline/tf.py", line 36, in <module>
    from mo.front.tf.extractor import get_tf_edges, tf_op_extractor, tf_op_extractors
  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/front/tf/extractor.py", line 29, in <module>
    from mo.front.tf.extractors.native_tf import native_tf_node_extractor
  File "/opt/intel/openvino_2019.1.144/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.1.144/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 ]  -------------------------------------------------

 

could anybody help me ?

0 Kudos
0 Replies
Reply