提交 46680247 authored 作者: abergeron's avatar abergeron

Merge pull request #3348 from nouiz/CoulombeC-master

Small visual changes (blue color) (bis)
......@@ -586,7 +586,8 @@ default_colorCodes = {'GpuFromHost': 'red',
'IfElse': 'magenta',
'Elemwise': '#FFAABB', # dark pink
'Subtensor': '#FFAAFF', # purple
'Alloc': '#FFAA22'} # orange
'Alloc': '#FFAA22', # orange
'Output': 'blue'}
def pydotprint(fct, outfile=None,
......@@ -889,7 +890,7 @@ def pydotprint(fct, outfile=None,
param['label'] = label
if hasattr(node.op, 'view_map') and idx in reduce(
list.__add__, node.op.view_map.values(), []):
param['color'] = 'blue'
param['color'] = colorCodes['Output']
elif hasattr(node.op, 'destroy_map') and idx in reduce(
list.__add__, node.op.destroy_map.values(), []):
param['color'] = 'red'
......@@ -939,9 +940,9 @@ def pydotprint(fct, outfile=None,
if high_contrast:
g.add_node(pd.Node(varid, style='filled',
label=varstr,
fillcolor='blue', shape=var_shape))
fillcolor=colorCodes['Output'], shape=var_shape))
else:
g.add_node(pd.Node(varid, color='blue',
g.add_node(pd.Node(varid, color=colorCodes['Output'],
label=varstr,
shape=var_shape))
elif len(var.clients) == 0:
......@@ -971,7 +972,7 @@ def pydotprint(fct, outfile=None,
for sha, up in input_update.items():
_, shaid = var_name(sha)
_, upid = var_name(up)
g.add_edge(pd.Edge(shaid, upid, label="UPDATE", color="blue"))
g.add_edge(pd.Edge(shaid, upid, label="UPDATE", color=colorCodes['Output']))
if cond_highlight:
g.add_subgraph(c1)
......@@ -1135,7 +1136,7 @@ def pydotprint_variables(vars,
my_list[nd] = varastr
color = None
if nd in vars:
color = 'blue'
color = colorCodes['Output']
elif nd in orphanes:
color = 'gray'
if color is None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论