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.

Model Optimizer with seq2seq model

mohan__deepa
Beginner
633 Views

I tried to run model optimizer on a tensorflow seq2seq frozen graph and got a graph cycle. Does it work with seq2seq?

 from ._conv import register_converters as _register_converters
[ ERROR ]  -------------------------------------------------
[ ERROR ]  ----------------- INTERNAL ERROR ----------------
[ ERROR ]  Unexpected exception happened.
[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  Graph contains a cycle.
[ ERROR ]  Traceback (most recent call last):
  File "c:\Intel\computer_vision_sdk_2018.1.249\deployment_tools\model_optimizer\mo\main.py", line 221, in main
    return driver(argv)
  File "c:\Intel\computer_vision_sdk_2018.1.249\deployment_tools\model_optimizer\mo\main.py", line 189, in driver
    mean_scale_values=mean_scale)
  File "c:\Intel\computer_vision_sdk_2018.1.249\deployment_tools\model_optimizer\mo\pipeline\tf.py", line 141, in tf2nx
    partial_infer(graph)
  File "c:\Intel\computer_vision_sdk_2018.1.249\deployment_tools\model_optimizer\mo\middle\passes\infer.py", line 55, in partial_infer
    nodes = nx.topological_sort(graph)
  File "C:\Users\dmohan\AppData\Roaming\Python\Python36\site-packages\networkx\algorithms\dag.py", line 157, in topological_sort
    raise nx.NetworkXUnfeasible("Graph contains a cycle.")
networkx.exception.NetworkXUnfeasible: Graph contains a cycle.

 

0 Kudos
3 Replies
Seunghyuk_P_Intel
633 Views

Hi Mohan deepa,

Please check this thread.

https://software.intel.com/en-us/forums/computer-vision/topic/777945

It has similar topic.

Regards,

Peter.

0 Kudos
mohan__deepa
Beginner
633 Views

Hi

I cannot figure what the fix is for this? Does model optimizer not support seq2seq model?

Deepa

 

0 Kudos
Severine_H_Intel
Employee
633 Views

Hi Deepa, 

as the other thread answer indicates,  In the general case, cycles are not supported by MO with seq2seq falling into that category. I invite you to read the recipe provided in the other thread on how to deal with this type of graph.

Best, 

Severine

0 Kudos
Reply