提交 3b78a25c authored 作者: Frederic Bastien's avatar Frederic Bastien

put in grey var that are not input, not output, and not a intermediate var.

This happen when an op return many output and some of them are just ignored.
上级 98abe879
......@@ -361,7 +361,9 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn
We print the op of the apply in the Apply box with a number that represent the toposort order of application of those Apply.
If an Apply have more then 1 input, print add a label to the edge that in the index of the inputs.
green ellipse are input to the graph and blue ellipse are output of the graph.
green ellipse are input to the graph
blue ellipse are output of the graph
grey ellipse are var generated by the graph that are not output and are not used.
"""
try:
import pydot as pd
......@@ -428,6 +430,9 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn
if out:
g.add_edge(pd.Edge(astr,varstr))
g.add_node(pd.Node(varstr,color='blue'))
elif len(var.clients)==0:
g.add_edge(pd.Edge(astr,varstr))
g.add_node(pd.Node(varstr,color='grey'))
elif var.name or not compact:
g.add_edge(pd.Edge(astr,varstr))
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论