提交 613fd23d authored 作者: Frederic Bastien's avatar Frederic Bastien

fix pydotprint in compact mode. Don't add twice the edge

上级 b5044dd3
......@@ -441,12 +441,8 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn
g.add_node(pd.Node(varstr,color='grey'))
elif var.name or not compact:
g.add_edge(pd.Edge(astr,varstr))
else:
#no name, so we don't make a var ellipse
for client in var.clients:
edge = pd.Edge(astr,apply_name(client[0]))
g.add_edge(edge)
g.set_simplify(True)
# else:
#don't add egde here as it is already added from the inputs.
g.write_png(outfile, prog='dot')
print 'The output file is available at',outfile
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论