提交 e21a5958 authored 作者: Frederic Bastien's avatar Frederic Bastien

in pydotprint, put the theano type of variable when they have a name.

上级 70a81a0e
...@@ -391,7 +391,7 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn ...@@ -391,7 +391,7 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn
return var_str[var] return var_str[var]
if var.name is not None: if var.name is not None:
varstr = var.name varstr = var.name+" "+str(var.type)
elif isinstance(var,gof.Constant): elif isinstance(var,gof.Constant):
dstr = str(var.data) dstr = str(var.data)
if '\n' in dstr: if '\n' in dstr:
...@@ -400,7 +400,7 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn ...@@ -400,7 +400,7 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn
dstr = dstr[:27]+'...' dstr = dstr[:27]+'...'
varstr = '%s [%s]'% (dstr, str(var.type)) varstr = '%s [%s]'% (dstr, str(var.type))
elif var in input_update and input_update[var].variable.name is not None: elif var in input_update and input_update[var].variable.name is not None:
varstr = input_update[var].variable.name varstr = input_update[var].variable.name+" "+str(var.type)
else: else:
#a var id is needed as otherwise var with the same type will be merged in the graph. #a var id is needed as otherwise var with the same type will be merged in the graph.
varstr = str(var.type) varstr = str(var.type)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论