AttributeError when using mo on tensorflow model

AttributeError when using mo on tensorflow model

E0617 19:51:23.057114 4490446272] -------------------------------------------------

E0617 19:51:23.057377 4490446272] ----------------- INTERNAL ERROR ----------------

E0617 19:51:23.057512 4490446272] Unexpected exception happened.

E0617 19:51:23.057620 4490446272] Please contact Model Optimizer developers and forward the following information:

E0617 19:51:23.057708 4490446272] module 'tensorflow' has no attribute 'NodeDef'

E0617 19:51:23.059118 4490446272] Traceback (most recent call last):

  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/", line 312, in main

    return driver(argv)

  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/", line 259, in driver

    import as mo_tf

  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/pipeline/", line 36, in <module>

    from import get_tf_edges, tf_op_extractor, tf_op_extractors

  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/front/tf/", line 29, in <module>

    from import native_tf_node_extractor

  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/front/tf/extractors/", line 17, in <module>

    from import tf_native_tf_node_infer

  File "/opt/intel/openvino_2019.1.144/deployment_tools/model_optimizer/mo/front/tf/partial_infer/", line 148, in <module>

    is_input: bool = False):

AttributeError: module 'tensorflow' has no attribute 'NodeDef'


E0617 19:51:23.059360 4490446272] ---------------- END OF BUG REPORT --------------

E0617 19:51:23.059457 4490446272] -------------------------------------------------


If needed, I can provide the pb file.


11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Dear Friedman, Benny,

Yes, please provide the frozen pb file (attach it). Also give me more details about this frozen pb, such as - what kind of model is it ? Did you build it from scratch ? Is it based on an existing Tensorflow model ? Finally, kindly give me the exact command you used.

Much thanks,


Any progress with this? I have provided the relevant files.

Dear Friedman, Benny,

I don't see an attachment ? 



It was sent on June 18 to How do you want to get it?

Dear Friedman, Benny,

I have PM'd you. Please respond to  the PM with your attachment.



Sent the response again.

Hope you got it.


Dear Friedman, Benny,

Nope. This is strange. I have not received it. Can you per chance attach it to this forum ticket as a *.zip file ?




I attach the .pb file zipped here.


Downloadapplication/zip cnn.pb_.zip24.41 MB

Dearest Friedman, Benny,

OK. Thanks for your attachment. I will try to run Model Optimizer on it but can you kindly try it on the latest OpenVino R2 release ?

We just released OpenVino 2019R2 today. Can you install it and try it ? Also what Model Optimizer Command did you use ? What kind of Tensorflow Model is it ? Did you build this model from scratch ? 

Please try the latest release and report your findings here.

Thanks !



That did it.

I no longer see the errors I did.

It still did not succeed, but now the errors are different.

I will try to overcome the new errors, and if needed, I'll open another ticket.

Thank you Shubha!


Leave a Comment

Please sign in to add a comment. Not a member? Join today